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
c00a73a9
Commit
c00a73a9
authored
Jul 26, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use SBI interface to communicate with NRF/UDM/NSSF
parent
5d86ed09
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
51 additions
and
86 deletions
+51
-86
etc/amf.conf
etc/amf.conf
+1
-1
src/amf-app/amf_app.cpp
src/amf-app/amf_app.cpp
+13
-12
src/amf-app/amf_app.hpp
src/amf-app/amf_app.hpp
+5
-5
src/amf-app/amf_config.cpp
src/amf-app/amf_config.cpp
+16
-16
src/amf-app/amf_config.hpp
src/amf-app/amf_config.hpp
+2
-2
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+3
-3
src/amf-app/amf_sbi.cpp
src/amf-app/amf_sbi.cpp
+5
-5
src/amf-app/amf_sbi.hpp
src/amf-app/amf_sbi.hpp
+0
-1
src/itti/msgs/itti_msg_n11.hpp
src/itti/msgs/itti_msg_n11.hpp
+0
-35
src/ngap/ngap_app/ngap_message_callback.hpp
src/ngap/ngap_app/ngap_message_callback.hpp
+1
-1
src/oai-amf/main.cpp
src/oai-amf/main.cpp
+3
-3
src/sbi/amf_server/impl/SubscriptionsCollectionDocumentApiImplEventExposure.cpp
...l/SubscriptionsCollectionDocumentApiImplEventExposure.cpp
+2
-2
No files found.
etc/amf.conf
View file @
c00a73a9
...
...
@@ -68,7 +68,7 @@ AMF =
};
# AMF binded interface for SBI (N11 (SMF)/N12 (AUSF), etc.)
N11
:
SBI
:
{
INTERFACE_NAME
=
"@AMF_INTERFACE_NAME_FOR_N11@"
;
IPV4_ADDRESS
=
"read"
;
...
...
src/amf-app/amf_app.cpp
View file @
c00a73a9
...
...
@@ -1018,7 +1018,7 @@ void amf_app::generate_amf_profile() {
nf_instance_profile
.
set_nf_priority
(
1
);
nf_instance_profile
.
set_nf_capacity
(
100
);
nf_instance_profile
.
delete_nf_ipv4_addresses
();
nf_instance_profile
.
add_nf_ipv4_addresses
(
amf_cfg
.
n11
.
addr4
);
nf_instance_profile
.
add_nf_ipv4_addresses
(
amf_cfg
.
sbi
.
addr4
);
// NF services
nf_service_t
nf_service
=
{};
...
...
@@ -1032,9 +1032,9 @@ void amf_app::generate_amf_profile() {
nf_service
.
nf_service_status
=
"REGISTERED"
;
// IP Endpoint
ip_endpoint_t
endpoint
=
{};
endpoint
.
ipv4_address
=
amf_cfg
.
n11
.
addr4
;
endpoint
.
ipv4_address
=
amf_cfg
.
sbi
.
addr4
;
endpoint
.
transport
=
"TCP"
;
endpoint
.
port
=
amf_cfg
.
n11
.
port
;
endpoint
.
port
=
amf_cfg
.
sbi
.
port
;
nf_service
.
ip_endpoints
.
push_back
(
endpoint
);
nf_instance_profile
.
delete_nf_services
();
...
...
@@ -1067,20 +1067,21 @@ std::string amf_app::get_nf_instance() const {
//---------------------------------------------------------------------------------------------
void
amf_app
::
register_to_nrf
()
{
// send request to
N11
to send NF registration to NRF
// send request to
SBI
to send NF registration to NRF
trigger_nf_registration_request
();
}
//------------------------------------------------------------------------------
void
amf_app
::
trigger_nf_registration_request
()
{
Logger
::
amf_app
().
debug
(
"Send ITTI msg to
N11
task to trigger the registration request to NRF"
);
"Send ITTI msg to
SBI
task to trigger the registration request to NRF"
);
std
::
shared_ptr
<
itti_sbi_register_nf_instance_request
>
itti_msg
=
std
::
make_shared
<
itti_sbi_register_nf_instance_request
>
(
TASK_AMF_APP
,
TASK_AMF_SBI
);
itti_msg
->
profile
=
nf_instance_profile
;
// TODO: use ITTI to send message between N1 and SBI
amf_sbi_inst
->
register_nf_instance
(
itti_msg
);
/*
...
...
@@ -1096,7 +1097,7 @@ void amf_app::trigger_nf_registration_request() {
//------------------------------------------------------------------------------
void
amf_app
::
trigger_nf_deregistration
()
const
{
Logger
::
amf_app
().
debug
(
"Send ITTI msg to
N11
task to trigger the deregistration request to NRF"
);
"Send ITTI msg to
SBI
task to trigger the deregistration request to NRF"
);
std
::
shared_ptr
<
itti_sbi_deregister_nf_instance
>
itti_msg
=
std
::
make_shared
<
itti_sbi_deregister_nf_instance
>
(
...
...
@@ -1129,8 +1130,8 @@ void amf_app::add_promise(
void
amf_app
::
add_promise
(
const
uint32_t
pid
,
const
boost
::
shared_ptr
<
boost
::
promise
<
nlohmann
::
json
>>&
p
)
{
std
::
unique_lock
lock
(
m_curl_handle_responses_
n11
);
curl_handle_responses_
n11
.
emplace
(
pid
,
p
);
std
::
unique_lock
lock
(
m_curl_handle_responses_
sbi
);
curl_handle_responses_
sbi
.
emplace
(
pid
,
p
);
}
//---------------------------------------------------------------------------------------------
...
...
@@ -1170,10 +1171,10 @@ void amf_app::trigger_process_response(
"Trigger process response: Set promise with ID %u "
"to ready"
,
pid
);
std
::
unique_lock
lock
(
m_curl_handle_responses_
n11
);
if
(
curl_handle_responses_
n11
.
count
(
pid
)
>
0
)
{
curl_handle_responses_
n11
[
pid
]
->
set_value
(
json_data
);
std
::
unique_lock
lock
(
m_curl_handle_responses_
sbi
);
if
(
curl_handle_responses_
sbi
.
count
(
pid
)
>
0
)
{
curl_handle_responses_
sbi
[
pid
]
->
set_value
(
json_data
);
// Remove this promise from list
curl_handle_responses_
n11
.
erase
(
pid
);
curl_handle_responses_
sbi
.
erase
(
pid
);
}
}
src/amf-app/amf_app.hpp
View file @
c00a73a9
...
...
@@ -37,7 +37,7 @@
#include "amf_module_from_config.hpp"
#include "amf_profile.hpp"
#include "itti.hpp"
#include "itti_msg_
n11
.hpp"
#include "itti_msg_
sbi
.hpp"
#include "itti_msg_amf_app.hpp"
#include "ue_context.hpp"
#include "amf_subscription.hpp"
...
...
@@ -92,9 +92,9 @@ class amf_app {
std
::
map
<
uint32_t
,
boost
::
shared_ptr
<
boost
::
promise
<
std
::
string
>>>
curl_handle_responses_n2_sm
;
mutable
std
::
shared_mutex
m_curl_handle_responses_
n11
;
mutable
std
::
shared_mutex
m_curl_handle_responses_
sbi
;
std
::
map
<
uint32_t
,
boost
::
shared_ptr
<
boost
::
promise
<
nlohmann
::
json
>>>
curl_handle_responses_
n11
;
curl_handle_responses_
sbi
;
util
::
uint_generator
<
uint32_t
>
n1n2sub_id_generator
;
std
::
map
<
...
...
@@ -458,14 +458,14 @@ class amf_app {
void
generate_amf_profile
();
/*
* Send request to
N11
task to trigger NF instance registration to NRF
* Send request to
SBI
task to trigger NF instance registration to NRF
* @param [void]
* @return void
*/
void
trigger_nf_registration_request
();
/*
* Send request to
N11
task to trigger NF instance deregistration to NRF
* Send request to
SBI
task to trigger NF instance deregistration to NRF
* @param [void]
* @return void
*/
...
...
src/amf-app/amf_config.cpp
View file @
c00a73a9
...
...
@@ -73,7 +73,7 @@ amf_config::amf_config() {
nssf_addr
.
api_version
=
"v1"
;
instance
=
0
;
n2
=
{};
n11
=
{};
sbi
=
{};
sbi_api_version
=
"v1"
;
sbi_http2_port
=
8080
;
statistics_interval
=
0
;
...
...
@@ -343,19 +343,19 @@ int amf_config::load(const std::string& config_file) {
new_if_cfg
[
AMF_CONFIG_STRING_INTERFACE_NGAP_AMF
];
load_interface
(
n2_amf_cfg
,
n2
);
//
N11
const
Setting
&
n11_cfg
=
new_if_cfg
[
AMF_CONFIG_STRING_INTERFACE_N11
];
load_interface
(
n11_cfg
,
n11
);
//
SBI
const
Setting
&
sbi_cfg
=
new_if_cfg
[
AMF_CONFIG_STRING_INTERFACE_SBI
];
load_interface
(
sbi_cfg
,
sbi
);
// SBI API VERSION
if
(
!
(
n11
_cfg
.
lookupValue
(
if
(
!
(
sbi
_cfg
.
lookupValue
(
AMF_CONFIG_STRING_API_VERSION
,
sbi_api_version
)))
{
Logger
::
amf_app
().
error
(
AMF_CONFIG_STRING_API_VERSION
"failed"
);
throw
(
AMF_CONFIG_STRING_API_VERSION
"failed"
);
}
// HTTP2 port
if
(
!
(
n11
_cfg
.
lookupValue
(
if
(
!
(
sbi
_cfg
.
lookupValue
(
AMF_CONFIG_STRING_SBI_HTTP2_PORT
,
sbi_http2_port
)))
{
Logger
::
amf_app
().
error
(
AMF_CONFIG_STRING_SBI_HTTP2_PORT
"failed"
);
throw
(
AMF_CONFIG_STRING_SBI_HTTP2_PORT
"failed"
);
...
...
@@ -363,7 +363,7 @@ int amf_config::load(const std::string& config_file) {
// SMF
const
Setting
&
smf_addr_pool
=
n11
_cfg
[
AMF_CONFIG_STRING_SMF_INSTANCES_POOL
];
sbi
_cfg
[
AMF_CONFIG_STRING_SMF_INSTANCES_POOL
];
int
count
=
smf_addr_pool
.
getLength
();
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
const
Setting
&
smf_addr_item
=
smf_addr_pool
[
i
];
...
...
@@ -755,10 +755,10 @@ void amf_config::display() {
Logger
::
config
().
info
(
" Port ..................: %d"
,
n2
.
port
);
Logger
::
config
().
info
(
"- SBI Networking:"
);
Logger
::
config
().
info
(
" Iface .................: %s"
,
n11
.
if_name
.
c_str
());
Logger
::
config
().
info
(
" Iface .................: %s"
,
sbi
.
if_name
.
c_str
());
Logger
::
config
().
info
(
" IP Addr ...............: %s"
,
inet_ntoa
(
n11
.
addr4
));
Logger
::
config
().
info
(
" Port ..................: %d"
,
n11
.
port
);
" IP Addr ...............: %s"
,
inet_ntoa
(
sbi
.
addr4
));
Logger
::
config
().
info
(
" Port ..................: %d"
,
sbi
.
port
);
Logger
::
config
().
info
(
" HTTP2 port ............: %d"
,
sbi_http2_port
);
Logger
::
config
().
info
(
" API version............: %s"
,
sbi_api_version
.
c_str
());
...
...
@@ -916,9 +916,9 @@ std::string amf_config::get_amf_n1n2_message_subscribe_uri(
if
(
support_features
.
use_http2
)
{
sbi_port
=
sbi_http2_port
;
}
else
{
sbi_port
=
n11
.
port
;
sbi_port
=
sbi
.
port
;
}
return
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
n11
.
addr4
)))
+
":"
+
return
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
sbi
.
addr4
)))
+
":"
+
std
::
to_string
(
sbi_port
)
+
NAMF_COMMUNICATION_BASE
+
sbi_api_version
+
"/ue-contexts/"
+
ue_cxt_id
+
"/n1-n2-messages/subscriptions"
;
}
...
...
@@ -982,8 +982,8 @@ void amf_config::to_json(nlohmann::json& json_data) const {
json_data
[
"auth_para"
]
=
auth_para
.
to_json
();
json_data
[
"n2"
]
=
n2
.
to_json
();
json_data
[
"
n11"
]
=
n11
.
to_json
();
json_data
[
"
n11
"
][
"sbi_http2_port"
]
=
sbi_http2_port
;
json_data
[
"
sbi"
]
=
sbi
.
to_json
();
json_data
[
"
sbi
"
][
"sbi_http2_port"
]
=
sbi_http2_port
;
json_data
[
"support_features"
]
=
support_features
.
to_json
();
...
...
@@ -1060,8 +1060,8 @@ bool amf_config::from_json(nlohmann::json& json_data) {
if
(
json_data
.
find
(
"n2"
)
!=
json_data
.
end
())
{
n2
.
from_json
(
json_data
[
"n2"
]);
}
if
(
json_data
.
find
(
"
n11
"
)
!=
json_data
.
end
())
{
n11
.
from_json
(
json_data
[
"n11
"
]);
if
(
json_data
.
find
(
"
sbi
"
)
!=
json_data
.
end
())
{
sbi
.
from_json
(
json_data
[
"sbi
"
]);
}
if
(
json_data
.
find
(
"sbi_http2_port"
)
!=
json_data
.
end
())
{
...
...
src/amf-app/amf_config.hpp
View file @
c00a73a9
...
...
@@ -59,7 +59,7 @@
#define AMF_CONFIG_STRING_PPID "PPID"
#define AMF_CONFIG_STRING_SBI_HTTP2_PORT "HTTP2_PORT"
#define AMF_CONFIG_STRING_INTERFACE_
N11 "N11
"
#define AMF_CONFIG_STRING_INTERFACE_
SBI "SBI
"
#define AMF_CONFIG_STRING_SMF_INSTANCES_POOL "SMF_INSTANCES_POOL"
#define AMF_CONFIG_STRING_SMF_INSTANCE_ID "SMF_INSTANCE_ID"
#define AMF_CONFIG_STRING_SMF_INSTANCE_PORT "PORT"
...
...
@@ -481,7 +481,7 @@ class amf_config {
unsigned
int
instance
;
std
::
string
pid_dir
;
interface_cfg_t
n2
;
interface_cfg_t
n11
;
interface_cfg_t
sbi
;
itti_cfg_t
itti
;
std
::
string
sbi_api_version
;
unsigned
int
sbi_http2_port
;
...
...
src/amf-app/amf_n1.cpp
View file @
c00a73a9
...
...
@@ -58,7 +58,7 @@
#include "amf_n2.hpp"
#include "comUt.hpp"
#include "itti.hpp"
#include "itti_msg_
n11
.hpp"
#include "itti_msg_
sbi
.hpp"
#include "itti_msg_n2.hpp"
#include "logger.hpp"
#include "nas_algorithms.hpp"
...
...
@@ -1772,7 +1772,7 @@ bool amf_n1::get_authentication_vectors_from_ausf(
uint8_t
http_version
=
1
;
if
(
amf_cfg
.
support_features
.
use_http2
)
http_version
=
2
;
//TODO: use ITTI to send message between N1 and SBI
//
TODO: use ITTI to send message between N1 and SBI
if
(
amf_sbi_inst
->
send_ue_authentication_request
(
authenticationinfo
,
ueauthenticationctx
,
http_version
))
{
unsigned
char
*
r5gauthdata_rand
=
conv
::
format_string_as_hex
(
...
...
@@ -4657,7 +4657,7 @@ void amf_n1::send_n1_message_notity(
const
std
::
shared_ptr
<
nas_context
>&
nc
,
const
std
::
string
&
target_amf
)
const
{
Logger
::
amf_n1
().
debug
(
"Send a request to
N11
to send N1 Message Notify to the target AMF"
);
"Send a request to
SBI
to send N1 Message Notify to the target AMF"
);
std
::
shared_ptr
<
itti_sbi_n1_message_notify
>
itti_msg
=
std
::
make_shared
<
itti_sbi_n1_message_notify
>
(
TASK_AMF_N1
,
TASK_AMF_SBI
);
...
...
src/amf-app/amf_sbi.cpp
View file @
c00a73a9
...
...
@@ -492,7 +492,7 @@ void amf_sbi::handle_pdu_session_initial_request(
else
smf_ip_addr
=
smf_addr
;
// provide http2 port if enabled
std
::
string
amf_port
=
to_string
(
amf_cfg
.
n11
.
port
);
std
::
string
amf_port
=
to_string
(
amf_cfg
.
sbi
.
port
);
if
(
amf_cfg
.
support_features
.
use_http2
)
amf_port
=
to_string
(
amf_cfg
.
sbi_http2_port
);
...
...
@@ -518,7 +518,7 @@ void amf_sbi::handle_pdu_session_initial_request(
pdu_session_establishment_request
[
"anType"
]
=
"3GPP_ACCESS"
;
// TODO
pdu_session_establishment_request
[
"smContextStatusUri"
]
=
"http://"
+
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
amf_cfg
.
n11
.
addr4
)))
+
":"
+
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
amf_cfg
.
sbi
.
addr4
)))
+
":"
+
amf_port
+
"/nsmf-pdusession/callback/"
+
supi
+
"/"
+
std
::
to_string
(
psc
.
get
()
->
pdu_session_id
);
...
...
@@ -1107,7 +1107,7 @@ void amf_sbi::curl_http_client(
curl_easy_setopt
(
curl
,
CURLOPT_URL
,
remote_uri
.
c_str
());
curl_easy_setopt
(
curl
,
CURLOPT_HTTPGET
,
1
);
curl_easy_setopt
(
curl
,
CURLOPT_TIMEOUT_MS
,
CURL_TIMEOUT_MS
);
curl_easy_setopt
(
curl
,
CURLOPT_INTERFACE
,
amf_cfg
.
n11
.
if_name
.
c_str
());
curl_easy_setopt
(
curl
,
CURLOPT_INTERFACE
,
amf_cfg
.
sbi
.
if_name
.
c_str
());
if
(
http_version
==
2
)
{
curl_easy_setopt
(
curl
,
CURLOPT_VERBOSE
,
1L
);
...
...
@@ -1376,7 +1376,7 @@ void amf_sbi::curl_http_client(
curl_easy_setopt
(
curl
,
CURLOPT_URL
,
remote_uri
.
c_str
());
curl_easy_setopt
(
curl
,
CURLOPT_HTTPGET
,
1
);
curl_easy_setopt
(
curl
,
CURLOPT_TIMEOUT_MS
,
CURL_TIMEOUT_MS
);
curl_easy_setopt
(
curl
,
CURLOPT_INTERFACE
,
amf_cfg
.
n11
.
if_name
.
c_str
());
curl_easy_setopt
(
curl
,
CURLOPT_INTERFACE
,
amf_cfg
.
sbi
.
if_name
.
c_str
());
if
(
http_version
==
2
)
{
curl_easy_setopt
(
curl
,
CURLOPT_VERBOSE
,
1L
);
...
...
@@ -1520,7 +1520,7 @@ void amf_sbi::curl_http_client(
curl_easy_setopt
(
curl
,
CURLOPT_TIMEOUT_MS
,
CURL_TIMEOUT_MS
);
curl_easy_setopt
(
curl
,
CURLOPT_TCP_KEEPALIVE
,
1
);
curl_easy_setopt
(
curl
,
CURLOPT_INTERFACE
,
amf_cfg
.
n11
.
if_name
.
c_str
());
curl_easy_setopt
(
curl
,
CURLOPT_INTERFACE
,
amf_cfg
.
sbi
.
if_name
.
c_str
());
if
(
http_version
==
2
)
{
curl_easy_setopt
(
curl
,
CURLOPT_VERBOSE
,
1L
);
...
...
src/amf-app/amf_sbi.hpp
View file @
c00a73a9
...
...
@@ -35,7 +35,6 @@
#include "AuthenticationInfo.h"
#include "UEAuthenticationCtx.h"
#include "itti_msg_n11.hpp"
#include "itti_msg_sbi.hpp"
#include "pdu_session_context.hpp"
...
...
src/itti/msgs/itti_msg_n11.hpp
deleted
100644 → 0
View file @
5d86ed09
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef _ITTI_N11_MSG_H_
#define _ITTI_N11_MSG_H_
#include <string>
#include "amf.hpp"
#include "amf_profile.hpp"
#include "bstrlib.h"
#include "itti_msg.hpp"
#include "SliceInfoForRegistration.h"
#endif
src/ngap/ngap_app/ngap_message_callback.hpp
View file @
c00a73a9
...
...
@@ -34,7 +34,7 @@
#include "amf_n1.hpp"
#include "amf_sbi.hpp"
#include "itti.hpp"
#include "itti_msg_
n11
.hpp"
#include "itti_msg_
sbi
.hpp"
#include "itti_msg_n2.hpp"
#include "logger.hpp"
#include "nas_context.hpp"
...
...
src/oai-amf/main.cpp
View file @
c00a73a9
...
...
@@ -124,15 +124,15 @@ int main(int argc, char** argv) {
Logger
::
amf_app
().
debug
(
"Initiating AMF server endpoints"
);
// AMF HTTP1 server
Pistache
::
Address
addr
(
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
amf_cfg
.
n11
.
addr4
))),
Pistache
::
Port
(
amf_cfg
.
n11
.
port
));
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
amf_cfg
.
sbi
.
addr4
))),
Pistache
::
Port
(
amf_cfg
.
sbi
.
port
));
amf_api_server_1
=
new
AMFApiServer
(
addr
,
amf_app_inst
);
amf_api_server_1
->
init
(
2
);
// std::thread amf_http1_manager(&AMFApiServer::start, amf_api_server_1);
amf_api_server_1
->
start
();
// AMF HTTP2 server
amf_api_server_2
=
new
amf_http2_server
(
conv
::
toString
(
amf_cfg
.
n11
.
addr4
),
amf_cfg
.
sbi_http2_port
,
amf_app_inst
);
conv
::
toString
(
amf_cfg
.
sbi
.
addr4
),
amf_cfg
.
sbi_http2_port
,
amf_app_inst
);
amf_api_server_2
->
init
(
1
);
// std::thread amf_http2_manager(&amf_http2_server::start, amf_api_server_2);
amf_api_server_2
->
start
();
...
...
src/sbi/amf_server/impl/SubscriptionsCollectionDocumentApiImplEventExposure.cpp
View file @
c00a73a9
...
...
@@ -66,8 +66,8 @@ void SubscriptionsCollectionDocumentApiImplEventExposure::create_subscription(
if
(
sub_id
!=
-
1
)
{
std
::
string
location
=
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
amf_cfg
.
n11
.
addr4
)))
+
":"
+
std
::
to_string
(
amf_cfg
.
n11
.
port
)
+
base
+
amf_cfg
.
sbi_api_version
+
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
amf_cfg
.
sbi
.
addr4
)))
+
":"
+
std
::
to_string
(
amf_cfg
.
sbi
.
port
)
+
base
+
amf_cfg
.
sbi_api_version
+
"/namf-evts/"
+
std
::
to_string
(
sub_id
);
json_data
[
"subscriptionId"
]
=
location
;
...
...
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