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
fcab3bd2
Commit
fcab3bd2
authored
Jul 25, 2021
by
Niuhaiwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify udsf IP address
parent
333cfe49
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
73 additions
and
73 deletions
+73
-73
src/amf-app/amf_app.cpp
src/amf-app/amf_app.cpp
+5
-5
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+28
-28
src/amf-app/amf_n11.cpp
src/amf-app/amf_n11.cpp
+7
-7
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+27
-27
src/ngap/ngap_app/ngap_message_callback.hpp
src/ngap/ngap_app/ngap_message_callback.hpp
+2
-2
src/sbi/amf_server/impl/N1N2MessageCollectionDocumentApiImpl.cpp
.../amf_server/impl/N1N2MessageCollectionDocumentApiImpl.cpp
+2
-2
src/sbi/amf_server/impl/TestSignallingApiImpl.cpp
src/sbi/amf_server/impl/TestSignallingApiImpl.cpp
+2
-2
No files found.
src/amf-app/amf_app.cpp
View file @
fcab3bd2
...
...
@@ -104,7 +104,7 @@ void amf_app_task(void*) {
itti_inst
->
notify_task_ready
(
task_id
);
// nlohmann::json udsf_response2;
// std::string record_id = "RECORD_ID=\'" + to_string(1221) + "\'";
// std::string udsf_url = "http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"+ std::string("nas_context/records/") + record_id;
// std::string udsf_url = "http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"+ std::string("nas_context/records/") + record_id;
// while(1)
// {amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response2);}
do
{
...
...
@@ -366,7 +366,7 @@ void amf_app::handle_itti_message(
/********************** hxs add *******************************/
std
::
string
record_id
=
"amf_ue_ngap_id=
\'
"
+
to_string
(
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_context/records/"
)
+
record_id
;
nlohmann
::
json
udsf_ue_context
;
nlohmann
::
json
cgi
;
cgi
[
"Content-ID"
]
=
"cgi"
;
...
...
@@ -396,7 +396,7 @@ void amf_app::handle_itti_message(
//amf_n2_inst->curl_http_client_udsf(udsf_url,json_part,"PUT",udsf_ue_context);
nlohmann
::
json
udsf_response
;
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
json_part
,
"PUT"
,
udsf_response
);
// udsf_url = "http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/" + std::string("gnb_context/records/") + std::to_string(itti_msg.assoc_id) ;
// udsf_url = "http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/" + std::string("gnb_context/records/") + std::to_string(itti_msg.assoc_id) ;
// if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){
// Logger::amf_n2().error("No existing gNG context with assoc_id (%d)", itti_msg.assoc_id);
// return;
...
...
@@ -407,7 +407,7 @@ void amf_app::handle_itti_message(
// gc1->gnb_context_from_json(udsf_response);
// gc2 = std::shared_ptr<gnb_context>(gc1);
// udsf_url = "http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/" + std::string("ue_context/records/") + std::to_string(uc.get()->ran_ue_ngap_id) ;
// udsf_url = "http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/" + std::string("ue_context/records/") + std::to_string(uc.get()->ran_ue_ngap_id) ;
// if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){
// Logger::amf_n2().error("No existing gNG context with assoc_id (%d)", uc.get()->ran_ue_ngap_id);
// return;
...
...
@@ -458,7 +458,7 @@ bool amf_app::generate_5g_guti(
std
::
shared_ptr
<
ue_context
>
uc
=
std
::
shared_ptr
<
ue_context
>
(
new
ue_context
());
nlohmann
::
json
udsf_response
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
ue_context_key
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing gNG context with assoc_id"
);
return
false
;
...
...
src/amf-app/amf_n1.cpp
View file @
fcab3bd2
...
...
@@ -251,7 +251,7 @@ void amf_n1::handle_itti_message(itti_uplink_nas_data_ind &nas_data_ind) {
nlohmann
::
json
udsf_response
;
nc
=
std
::
shared_ptr
<
nas_context
>
(
new
nas_context
());
std
::
string
record_id
=
"guti=
\'
"
+
guti
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
))
{
Logger
::
amf_n1
().
error
(
"No existing nas_context with GUTI %s"
,
guti
.
c_str
());
...
...
@@ -423,7 +423,7 @@ void amf_n1::nas_signalling_establishment_request_handle(
string
auts
;
octet_stream_2_hex_stream
((
uint8_t
*
)
bdata
(
nc
.
get
()
->
auts
),
blength
(
nc
.
get
()
->
auts
),
auts
);
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
nlohmann
::
json
udsf_nas_context
;
nlohmann
::
json
udsf_response
;
udsf_nas_context
[
"meta"
]
[
"tags"
]
=
{
...
...
@@ -620,7 +620,7 @@ void amf_n1::nas_signalling_establishment_request_handle(
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
udsf_nas_context
.
dump
(),
"PUT"
,
udsf_response
);
// udsf_url = "http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/" + std::string("nas_context/records/") + std::to_string(nc.get()->amf_ue_ngap_id) ;
// udsf_url = "http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/" + std::string("nas_context/records/") + std::to_string(nc.get()->amf_ue_ngap_id) ;
// if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){
// Logger::amf_n2().error("No existing nas context with amf_ue_ngap_id (%d)", nc.get()->amf_ue_ngap_id);
// return;
...
...
@@ -851,7 +851,7 @@ void amf_n1::identity_response_handle(uint32_t ran_ue_ngap_id,
nc
.
get
()
->
imsi
=
supi
;
/***************************hsx add************************/
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
nlohmann
::
json
udsf_nas_context
;
nlohmann
::
json
udsf_response
;
...
...
@@ -975,7 +975,7 @@ void amf_n1::service_request_handle(bool isNasSig,
pdu_session_context
*
psc1
=
new
pdu_session_context
();
nlohmann
::
json
udsf_response
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
supi
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
bool
is_supi_to_pdu_ctx_udsf
=
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
);
if
(
!
is_supi_to_pdu_ctx_udsf
){
Logger
::
amf_n2
().
error
(
"No existing pdu_session_context with assoc_id "
);
...
...
@@ -1027,7 +1027,7 @@ void amf_n1::service_request_handle(bool isNasSig,
bstring
kgnb_bs
=
blk2bstr
(
kgnb
,
32
);
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
supi
+
"
\'
"
;
std
::
string
udsf_put_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
std
::
string
udsf_put_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
nlohmann
::
json
udsf_put_pdu_session_context
;
// nlohmann::json udsf_response;
udsf_put_pdu_session_context
[
"meta"
]
[
"tags"
]
=
{
...
...
@@ -1102,7 +1102,7 @@ void amf_n1::service_request_handle(bool isNasSig,
Logger
::
amf_n1
().
error
(
"Cannot get pdu session information"
);
}
record_id
=
"RECORD_ID=
\'
"
+
supi
+
"
\'
"
;
std
::
string
udsf_put_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
std
::
string
udsf_put_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
nlohmann
::
json
udsf_put_pdu_session_context
;
// nlohmann::json udsf_response;
udsf_put_pdu_session_context
[
"meta"
]
[
"tags"
]
=
{
...
...
@@ -1627,7 +1627,7 @@ void amf_n1::registration_request_handle(bool isNasSig,
/**********************hsx add***********************/
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
nlohmann
::
json
udsf_response
;
udsf_nas_context
[
"meta"
]
[
"tags"
]
=
{
...
...
@@ -1652,7 +1652,7 @@ void amf_n1::registration_request_handle(bool isNasSig,
// printf("----------------udsf_nas_context %s---------\n",udsf_nas_context.dump().c_str());
// amf_n2_inst->curl_http_client_udsf(udsf_url,udsf_nas_context.dump(),"PUT",udsf_response);
// udsf_url = "http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/" + std::string("nas_context/records/") + std::to_string(nc.get()->amf_ue_ngap_id) ;
// udsf_url = "http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/" + std::string("nas_context/records/") + std::to_string(nc.get()->amf_ue_ngap_id) ;
// if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){
// Logger::amf_n2().error("No existing gNG context with assoc_id (%d)", nc.get()->amf_ue_ngap_id);
// return;
...
...
@@ -1761,7 +1761,7 @@ bool amf_n1::is_guti_2_nas_context_in_udsf(const std::string &guti) {
printf
(
"-------is_guti_2_nas_context_in_udsf-------------
\n
"
);
nlohmann
::
json
udsf_response
;
std
::
string
record_id
=
"guti=
\'
"
+
guti
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
return
(
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
));
}
std
::
shared_ptr
<
nas_context
>
amf_n1
::
guti_2_nas_context_in_udsf
(
const
std
::
string
&
guti
)
const
{
...
...
@@ -1769,7 +1769,7 @@ std::shared_ptr<nas_context> amf_n1::guti_2_nas_context_in_udsf(const std::strin
nlohmann
::
json
udsf_response
;
std
::
shared_ptr
<
nas_context
>
nc
=
std
::
shared_ptr
<
nas_context
>
(
new
nas_context
());
std
::
string
record_id
=
"guti=
\'
"
+
guti
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
))
{
Logger
::
amf_n1
().
error
(
"No existing nas_context with GUTI %s"
,
guti
.
c_str
());
...
...
@@ -1782,14 +1782,14 @@ std::shared_ptr<nas_context> amf_n1::guti_2_nas_context_in_udsf(const std::strin
bool
amf_n1
::
is_amf_ue_id_2_nas_context_in_udsf
(
const
long
&
amf_ue_ngap_id
)
const
{
nlohmann
::
json
udsf_response
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
to_string
(
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
return
(
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
));
}
std
::
shared_ptr
<
nas_context
>
amf_n1
::
amf_ue_id_2_nas_context_in_udsf
(
const
long
&
amf_ue_ngap_id
)
const
{
nlohmann
::
json
udsf_response
;
std
::
shared_ptr
<
nas_context
>
nc
=
std
::
shared_ptr
<
nas_context
>
(
new
nas_context
());
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
to_string
(
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
))
{
Logger
::
amf_n1
().
error
(
"No existing nas_context with amf_ue_ngap_id %s"
,
to_string
(
amf_ue_ngap_id
).
c_str
());
...
...
@@ -1899,7 +1899,7 @@ void amf_n1::run_registration_procedure(std::shared_ptr<nas_context> &nc) {
ngksi
[
"Content-Type"
]
=
"varchar(32)"
;
ngksi
[
"content"
]
=
to_string
(
nc
.
get
()
->
ngKsi
);
udsf_nas_context
[
"blocks"
].
push_back
(
ngksi
);
// std::string udsf_url = "http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/" + std::string("nas_context/records/") + to_string(nc.get()->amf_ue_ngap_id) ;
// std::string udsf_url = "http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/" + std::string("nas_context/records/") + to_string(nc.get()->amf_ue_ngap_id) ;
// amf_n2_inst->curl_http_client_udsf(udsf_url,udsf_nas_context.dump(),"PUT",udsf_response);
}
else
if
(
nc
.
get
()
->
is_5g_guti_present
)
{
Logger
::
amf_n1
().
debug
(
"Start to run identification procedure"
);
...
...
@@ -1924,7 +1924,7 @@ void amf_n1::run_registration_procedure(std::shared_ptr<nas_context> &nc) {
dnt
->
ran_ue_ngap_id
=
nc
.
get
()
->
ran_ue_ngap_id
;
/*************************hsx add**************************/
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
udsf_nas_context
[
"meta"
]
[
"tags"
]
=
{
{
"RECORD_ID"
,
nlohmann
::
json
::
array
({
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)})},
{
"from_nf_ID"
,
nlohmann
::
json
::
array
({
"AMF_1234"
})}
...
...
@@ -2222,7 +2222,7 @@ bool amf_n1::authentication_vectors_from_ausf(
return
false
;
}
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
udsf_nas_context
[
"meta"
]
[
"tags"
]
=
{
{
"RECORD_ID"
,
nlohmann
::
json
::
array
({
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)})},
...
...
@@ -2322,7 +2322,7 @@ bool amf_n1::_5g_aka_confirmation_from_ausf(std::shared_ptr<nas_context> &nc,
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
udsf_nas_context
[
"meta"
]
[
"tags"
]
=
{
{
"RECORD_ID"
,
nlohmann
::
json
::
array
({
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)})},
{
"from_nf_ID"
,
nlohmann
::
json
::
array
({
"AMF_1234"
})}
...
...
@@ -2391,7 +2391,7 @@ bool amf_n1::authentication_vectors_generator_in_ausf(
}
udsf_nas_context
[
"blocks"
].
push_back
(
_5g_av
);
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
udsf_nas_context
[
"meta"
]
[
"tags"
]
=
{
{
"RECORD_ID"
,
nlohmann
::
json
::
array
({
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)})},
...
...
@@ -2648,7 +2648,7 @@ void amf_n1::handle_auth_vector_successful_result(
ngKsi
[
"content"
]
=
to_string
(
nc
.
get
()
->
ngKsi
);
udsf_nas_context
[
"blocks"
].
push_back
(
ngKsi
);
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
udsf_nas_context
[
"meta"
]
[
"tags"
]
=
{
{
"RECORD_ID"
,
nlohmann
::
json
::
array
({
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)})},
{
"from_nf_ID"
,
nlohmann
::
json
::
array
({
"AMF_1234"
})}
...
...
@@ -2729,7 +2729,7 @@ bool amf_n1::start_authentication_procedure(std::shared_ptr<nas_context> nc,
Logger
::
amf_n1
().
debug
(
"amf_ue_ngap_id 0x%x"
,
nc
.
get
()
->
amf_ue_ngap_id
);
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
nlohmann
::
json
udsf_ue_nas_context
;
udsf_nas_context
[
"meta"
]
[
"tags"
]
=
{
{
"RECORD_ID"
,
nlohmann
::
json
::
array
({
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)})},
...
...
@@ -2846,7 +2846,7 @@ void amf_n1::authentication_response_handle(uint32_t ran_ue_ngap_id,
}
}
// std::string record_id = "RECORD_ID=\'" + to_string(nc.get()->amf_ue_ngap_id) + "\'";
// std::string udsf_url = "http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/" + std::string("ue_nas_context/records/") +record_id ;
// std::string udsf_url = "http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/" + std::string("ue_nas_context/records/") +record_id ;
// nlohmann::json udsf_ue_nas_context;
// udsf_ue_nas_context["meta"] ["tags"] = {
// {"RECORD_ID",nlohmann::json::array({to_string(nc.get()->amf_ue_ngap_id)})},
...
...
@@ -2930,7 +2930,7 @@ void amf_n1::authentication_failure_handle(uint32_t ran_ue_ngap_id,
udsf_nas_context
[
"blocks"
].
push_back
(
auts_json
);
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
udsf_nas_context
[
"meta"
]
[
"tags"
]
=
{
{
"RECORD_ID"
,
nlohmann
::
json
::
array
({
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)})},
{
"from_nf_ID"
,
nlohmann
::
json
::
array
({
"AMF_1234"
})}
...
...
@@ -3071,7 +3071,7 @@ bool amf_n1::start_security_mode_control_procedure(
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
udsf_nas_context
[
"meta"
]
[
"tags"
]
=
{
{
"RECORD_ID"
,
nlohmann
::
json
::
array
({
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)})},
{
"from_nf_ID"
,
nlohmann
::
json
::
array
({
"AMF_1234"
})}
...
...
@@ -3368,7 +3368,7 @@ void amf_n1::registration_complete_handle(uint32_t ran_ue_ngap_id,
string
auts
;
octet_stream_2_hex_stream
((
uint8_t
*
)
bdata
(
nc
.
get
()
->
auts
),
blength
(
nc
.
get
()
->
auts
),
auts
);
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
nlohmann
::
json
udsf_nas_context
;
nlohmann
::
json
udsf_response
;
udsf_nas_context
[
"meta"
]
[
"tags"
]
=
{
...
...
@@ -4188,7 +4188,7 @@ void amf_n1::run_mobility_registration_update_procedure(
pdu_session_context
*
psc1
=
new
pdu_session_context
();
nlohmann
::
json
udsf_response
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
supi
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing pdu_session_context with assoc_id "
);
return
;
...
...
@@ -4297,7 +4297,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>(
pdu_session_context
*
psc1
=
new
pdu_session_context
();
nlohmann
::
json
udsf_response
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
supi
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing pdu_session_context with assoc_id "
);
}
...
...
@@ -4403,7 +4403,7 @@ void amf_n1::run_periodic_registration_update_procedure(
pdu_session_context
*
psc1
=
new
pdu_session_context
();
nlohmann
::
json
udsf_response
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
supi
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing pdu_session_context with assoc_id "
);
}
...
...
@@ -4454,7 +4454,7 @@ void amf_n1::set_5gmm_state(std::shared_ptr<nas_context> nc,
udsf_nas_context
[
"blocks"
].
push_back
(
_5gmm_state
);
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id
;
udsf_nas_context
[
"meta"
]
[
"tags"
]
=
{
{
"RECORD_ID"
,
nlohmann
::
json
::
array
({
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)})},
...
...
src/amf-app/amf_n11.cpp
View file @
fcab3bd2
...
...
@@ -186,7 +186,7 @@ void amf_n11::handle_itti_message(
nlohmann
::
json
udsf_response
;
std
::
shared_ptr
<
nas_context
>
nc
=
std
::
shared_ptr
<
nas_context
>
(
new
nas_context
());
std
::
string
record_id_nas
=
"amf_ue_ngap_id=
\'
"
+
to_string
(
itti_msg
.
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url_nas
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id_nas
;
std
::
string
udsf_url_nas
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id_nas
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url_nas
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing pdu_session_context with assoc_id "
);
return
;
...
...
@@ -202,7 +202,7 @@ void amf_n11::handle_itti_message(
supi
.
c_str
(),
itti_msg
.
pdu_session_id
);
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
supi
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing pdu_session_context with assoc_id "
);
return
;
...
...
@@ -287,7 +287,7 @@ void amf_n11::handle_itti_message(itti_smf_services_consumer& smf) {
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
supi
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)
){
Logger
::
amf_n2
().
error
(
"No existing pdu_session_context with assoc_id "
);
psc
=
std
::
shared_ptr
<
pdu_session_context
>
(
new
pdu_session_context
());
...
...
@@ -465,7 +465,7 @@ void amf_n11::handle_pdu_session_initial_request(
//send udsf to storage us_ngap_context recordid=ran+ue_ngap_id
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
supi
+
"
\'
"
;
std
::
string
udsf_put_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
std
::
string
udsf_put_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
nlohmann
::
json
udsf_pdu_session_context
;
// nlohmann::json udsf_response;
udsf_pdu_session_context
[
"meta"
]
[
"tags"
]
=
{
...
...
@@ -560,7 +560,7 @@ void amf_n11::handle_itti_message(
nlohmann
::
json
udsf_response
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
itti_msg
.
supi
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing pdu_session_context with assoc_id "
);
}
...
...
@@ -672,7 +672,7 @@ void amf_n11::curl_http_client(
//***************************stateless
nlohmann
::
json
udsf_response
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
supi
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing pdu_session_context with assoc_id "
);
return
;
...
...
@@ -833,7 +833,7 @@ void amf_n11::curl_http_client(
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
supi
+
"
\'
"
;
std
::
string
udsf_put_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
std
::
string
udsf_put_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
nlohmann
::
json
udsf_put_pdu_session_context
;
udsf_put_pdu_session_context
[
"meta"
]
[
"tags"
]
=
{
{
"RECORD_ID"
,
nlohmann
::
json
::
array
({
supi
})},
...
...
src/amf-app/amf_n2.cpp
View file @
fcab3bd2
...
...
@@ -93,7 +93,7 @@ void amf_n2_task(void* args_p) {
itti_inst
->
notify_task_ready
(
task_id
);
// nlohmann::json udsf_response2;
// std::string record_id = "RECORD_ID=\'" + to_string(361) + "\'";
// std::string udsf_url = "http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"+ std::string("gnb_context/records/") + record_id;
// std::string udsf_url = "http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"+ std::string("gnb_context/records/") + record_id;
// while(1)
// {amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response2);}
do
{
...
...
@@ -447,7 +447,7 @@ void amf_n2::handle_itti_message(itti_ng_setup_request& itti_msg) {
octet_stream_2_hex_stream
((
uint8_t
*
)
bdata
(
gc
.
get
()
->
ue_radio_cap_ind
),
blength
(
gc
.
get
()
->
ue_radio_cap_ind
),
ue_radio_cap_ind
);
nlohmann
::
json
udsf_response
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
to_string
(
itti_msg
.
assoc_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
nlohmann
::
json
udsf_gnb_context
;
udsf_gnb_context
[
"meta"
]
[
"tags"
]
=
{
{
"RECORD_ID"
,
nlohmann
::
json
::
array
({
to_string
(
itti_msg
.
assoc_id
)})},
...
...
@@ -474,7 +474,7 @@ void amf_n2::handle_itti_message(itti_ng_setup_request& itti_msg) {
// udsf_url = "http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/" + std::string("gnb_context/records/") + std::to_string(itti_msg.assoc_id) ;
// udsf_url = "http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/" + std::string("gnb_context/records/") + std::to_string(itti_msg.assoc_id) ;
// if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){
// Logger::amf_n2().error("No existing gNG context with assoc_id (%d)", itti_msg.assoc_id);
// return;
...
...
@@ -583,7 +583,7 @@ void amf_n2::handle_itti_message(itti_initial_ue_message& init_ue_msg) {
nlohmann
::
json
udsf_ue_ngap_context
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
std
::
to_string
(
init_ue_msg
.
assoc_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing gNG context with assoc_id (%d)"
,
init_ue_msg
.
assoc_id
);
return
;
...
...
@@ -680,7 +680,7 @@ void amf_n2::handle_itti_message(itti_initial_ue_message& init_ue_msg) {
{
nlohmann
::
json
udsf_response3
;
std
::
string
record_id_nas
=
"guti=
\'
"
+
guti
+
"
\'
"
;
std
::
string
udsf_url3
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id_nas
;
std
::
string
udsf_url3
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id_nas
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url3
,
""
,
"GET"
,
udsf_response3
))
{
Logger
::
amf_n1
().
error
(
"No existing nas_context with GUTI %s"
,
guti
.
c_str
());
...
...
@@ -717,7 +717,7 @@ void amf_n2::handle_itti_message(itti_initial_ue_message& init_ue_msg) {
nlohmann
::
json
udsf_response
;
std
::
string
record_id_nas
=
"guti=
\'
"
+
guti
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id_nas
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id_nas
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
))
{
Logger
::
amf_n1
().
error
(
"No existing nas_context with GUTI %s"
,
guti
.
c_str
());
...
...
@@ -830,7 +830,7 @@ void amf_n2::handle_itti_message(itti_initial_ue_message& init_ue_msg) {
record_id_ue_ngap
=
"RECORD_ID=
\'
"
+
std
::
to_string
(
nc
.
get
()
->
ran_ue_ngap_id
)
+
"
\'
"
;
nlohmann
::
json
udsf_nas_context
;
std
::
string
record_id_nas
=
"RECORD_ID=
\'
"
+
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url_nas
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id_nas
;
std
::
string
udsf_url_nas
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id_nas
;
udsf_response
;
udsf_nas_context
[
"meta"
]
[
"tags"
]
=
{
{
"RECORD_ID"
,
nlohmann
::
json
::
array
({
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)})},
...
...
@@ -864,7 +864,7 @@ void amf_n2::handle_itti_message(itti_initial_ue_message& init_ue_msg) {
record_id_ue_ngap
=
"RECORD_ID=
\'
"
+
std
::
to_string
(
nc
.
get
()
->
ran_ue_ngap_id
)
+
"
\'
"
;
nlohmann
::
json
udsf_nas_context
;
std
::
string
record_id_nas
=
"RECORD_ID=
\'
"
+
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url_nas
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id_nas
;
std
::
string
udsf_url_nas
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
record_id_nas
;
udsf_response
;
udsf_nas_context
[
"meta"
]
[
"tags"
]
=
{
{
"RECORD_ID"
,
nlohmann
::
json
::
array
({
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)})},
...
...
@@ -893,7 +893,7 @@ void amf_n2::handle_itti_message(itti_initial_ue_message& init_ue_msg) {
//send udsf to storage us_ngap_context recordid=ran+ue_ngap_id
std
::
string
udsf_put_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
record_id_ue_ngap
;
std
::
string
udsf_put_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
record_id_ue_ngap
;
// nlohmann::json udsf_response;
udsf_ue_ngap_context
[
"meta"
]
[
"tags"
]
=
{
...
...
@@ -915,7 +915,7 @@ void amf_n2::handle_itti_message(itti_initial_ue_message& init_ue_msg) {
// udsf_put_url = "http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/" + std::string("ue_ngap_context/records/") + std::to_string(unc.get()->ran_ue_ngap_id) ;
// udsf_put_url = "http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/" + std::string("ue_ngap_context/records/") + std::to_string(unc.get()->ran_ue_ngap_id) ;
// if(!amf_n2_inst->curl_http_client_udsf(udsf_put_url,"","GET",udsf_response)){
// Logger::amf_n2().error("No existing gNG context with assoc_id (%d)", unc.get()->ran_ue_ngap_id);
// return;
...
...
@@ -952,7 +952,7 @@ void amf_n2::handle_itti_message(itti_ul_nas_transport& ul_nas_transport) {
nlohmann
::
json
udsf_response
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
std
::
to_string
(
ul_nas_transport
.
assoc_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing gNG context with assoc_id"
);
return
;
...
...
@@ -966,7 +966,7 @@ void amf_n2::handle_itti_message(itti_ul_nas_transport& ul_nas_transport) {
nlohmann
::
json
udsf_response_ue_ngap_context
;
record_id
=
"RECORD_ID=
\'
"
+
std
::
to_string
(
ran_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url_ue_ngap_context
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
record_id
;
std
::
string
udsf_url_ue_ngap_context
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url_ue_ngap_context
,
""
,
"GET"
,
udsf_response_ue_ngap_context
)){
Logger
::
amf_n2
().
error
(
"No existing ue_ngap context with ran_ue_ngap_id "
);
return
;
...
...
@@ -1049,7 +1049,7 @@ void amf_n2::handle_itti_message(itti_dl_nas_transport& dl_nas_transport) {
nlohmann
::
json
udsf_response
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
std
::
to_string
(
dl_nas_transport
.
ran_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing ue_ngap context with ran_ue_ngap_id "
);
return
;
...
...
@@ -1063,7 +1063,7 @@ void amf_n2::handle_itti_message(itti_dl_nas_transport& dl_nas_transport) {
record_id
=
"RECORD_ID=
\'
"
+
std
::
to_string
(
unc
.
get
()
->
gnb_assoc_id
)
+
"
\'
"
;
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing gNG context with assoc_id (%d)"
,
unc
.
get
()
->
gnb_assoc_id
);
return
;
...
...
@@ -1103,7 +1103,7 @@ void amf_n2::handle_itti_message(itti_dl_nas_transport& dl_nas_transport) {
record_id
=
"RECORD_ID=
\'
"
+
std
::
to_string
(
unc
.
get
()
->
ran_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_put_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
record_id
;
std
::
string
udsf_put_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
record_id
;
nlohmann
::
json
udsf_ue_ngap_context
;
udsf_ue_ngap_context
[
"meta"
]
[
"tags"
]
=
{
{
"RECORD_ID"
,
nlohmann
::
json
::
array
({
to_string
(
unc
.
get
()
->
ran_ue_ngap_id
)})},
...
...
@@ -1142,7 +1142,7 @@ void amf_n2::handle_itti_message(itti_initial_context_setup_request& itti_msg) {
std
::
shared_ptr
<
ue_ngap_context
>
unc
=
std
::
shared_ptr
<
ue_ngap_context
>
(
new
ue_ngap_context
());
nlohmann
::
json
udsf_response_ue_ngap_context
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
std
::
to_string
(
itti_msg
.
ran_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url_ue_ngap_context
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
record_id
;
std
::
string
udsf_url_ue_ngap_context
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url_ue_ngap_context
,
""
,
"GET"
,
udsf_response_ue_ngap_context
)){
Logger
::
amf_n2
().
error
(
"No existing ue_ngap context with ran_ue_ngap_id "
);
return
;
...
...
@@ -1154,7 +1154,7 @@ void amf_n2::handle_itti_message(itti_initial_context_setup_request& itti_msg) {
nlohmann
::
json
udsf_response
;
record_id
=
"RECORD_ID=
\'
"
+
std
::
to_string
(
unc
.
get
()
->
gnb_assoc_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing gNG context with assoc_id"
);
return
;
...
...
@@ -1244,7 +1244,7 @@ void amf_n2::handle_itti_message(
nlohmann
::
json
udsf_response_ue_ngap_context
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
std
::
to_string
(
itti_msg
.
ran_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url_ue_ngap_context
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
record_id
;
std
::
string
udsf_url_ue_ngap_context
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url_ue_ngap_context
,
""
,
"GET"
,
udsf_response_ue_ngap_context
)){
Logger
::
amf_n2
().
error
(
"No existing ue_ngap context with ran_ue_ngap_id "
);
return
;
...
...
@@ -1257,7 +1257,7 @@ void amf_n2::handle_itti_message(
record_id
=
"RECORD_ID=
\'
"
+
std
::
to_string
(
unc
.
get
()
->
gnb_assoc_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing gNG context with assoc_id"
);
return
;
...
...
@@ -1316,7 +1316,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>(
record_id
=
"RECORD_ID=
\'
"
+
supi
+
"
\'
"
;
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing pdu_session_context with assoc_id "
);
}
...
...
@@ -1370,7 +1370,7 @@ void amf_n2::handle_itti_message(
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
std
::
to_string
(
itti_msg
.
ran_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url_ue_ngap_context
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
record_id
;
std
::
string
udsf_url_ue_ngap_context
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url_ue_ngap_context
,
""
,
"GET"
,
udsf_response_ue_ngap_context
)){
Logger
::
amf_n2
().
error
(
"No existing ue_ngap context with ran_ue_ngap_id "
);
return
;
...
...
@@ -1382,7 +1382,7 @@ void amf_n2::handle_itti_message(
nlohmann
::
json
udsf_response
;
record_id
=
"RECORD_ID=
\'
"
+
std
::
to_string
(
unc
.
get
()
->
gnb_assoc_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing gNG context with assoc_id"
);
return
;
...
...
@@ -1469,7 +1469,7 @@ void amf_n2::handle_itti_message(itti_ue_context_release_command& itti_msg) {
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
std
::
to_string
(
itti_msg
.
ran_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url_ue_ngap_context
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
record_id
;
std
::
string
udsf_url_ue_ngap_context
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url_ue_ngap_context
,
""
,
"GET"
,
udsf_response_ue_ngap_context
)){
Logger
::
amf_n2
().
error
(
"No existing ue_ngap context with ran_ue_ngap_id "
);
return
;
...
...
@@ -1482,7 +1482,7 @@ void amf_n2::handle_itti_message(itti_ue_context_release_command& itti_msg) {
record_id
=
"RECORD_ID=
\'
"
+
std
::
to_string
(
unc
.
get
()
->
gnb_assoc_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing gNG context with assoc_id"
);
return
;
...
...
@@ -1538,7 +1538,7 @@ void amf_n2::handle_itti_message(
nlohmann
::
json
udsf_response
;
std
::
shared_ptr
<
gnb_context
>
gc
=
std
::
shared_ptr
<
gnb_context
>
(
new
gnb_context
());
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
std
::
to_string
(
itti_msg
.
assoc_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
// if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){
// Logger::amf_n2().error("No existing gNG context with assoc_id");
// return;
...
...
@@ -1566,7 +1566,7 @@ void amf_n2::handle_itti_message(
record_id
=
"RECORD_ID=
\'
"
+
std
::
to_string
(
itti_msg
.
assoc_id
)
+
"
\'
"
;
std
::
string
udsf_update_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
std
::
string
udsf_update_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
nlohmann
::
json
udsf_gnb_update_context
;
// nlohmann::json udsf_response;
udsf_gnb_update_context
[
"meta"
]
[
"tags"
]
=
{
...
...
@@ -1733,7 +1733,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>(
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
supi
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing pdu_session_context with assoc_id "
);
}
...
...
src/ngap/ngap_app/ngap_message_callback.hpp
View file @
fcab3bd2
...
...
@@ -395,7 +395,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>(
nlohmann
::
json
udsf_response
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
supi
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing pdu_session_context with assoc_id "
);
return
0
;
...
...
@@ -419,7 +419,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>(
record_id
=
"RECORD_ID=
\'
"
+
supi
+
"
\'
"
;
std
::
string
udsf_put_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
std
::
string
udsf_put_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
nlohmann
::
json
udsf_put_pdu_session_context
;
//nlohmann::json udsf_response;
udsf_put_pdu_session_context
[
"meta"
]
[
"tags"
]
=
{
...
...
src/sbi/amf_server/impl/N1N2MessageCollectionDocumentApiImpl.cpp
View file @
fcab3bd2
...
...
@@ -94,7 +94,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>(
nlohmann
::
json
udsf_response
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
supi
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing pdu_session_context with assoc_id "
);
}
...
...
@@ -131,7 +131,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>(
record_id
=
"RECORD_ID=
\'
"
+
supi
+
"
\'
"
;
std
::
string
udsf_put_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
std
::
string
udsf_put_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
nlohmann
::
json
udsf_put_pdu_session_context
;
//nlohmann::json udsf_response;
udsf_put_pdu_session_context
[
"meta"
]
[
"tags"
]
=
{
...
...
src/sbi/amf_server/impl/TestSignallingApiImpl.cpp
View file @
fcab3bd2
...
...
@@ -39,7 +39,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>(
nlohmann
::
json
udsf_response
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
supi
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
if
(
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_server
().
debug
(
"udsf_response: %s"
,
udsf_response
.
dump
().
c_str
());
psc
.
get
()
->
pdu_session_context_from_json
(
udsf_response
);
...
...
@@ -106,7 +106,7 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>(
nlohmann
::
json
udsf_response
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
supi
+
"
\'
"
;
std
::
string
udsf_url
=
"http://192.168.
199.201
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
std
::
string
udsf_url
=
"http://192.168.
83.130
:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"pdu_session_context/records/"
)
+
record_id
;
if
(
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_server
().
debug
(
"udsf_response: %s"
,
udsf_response
.
dump
().
c_str
());
psc
.
get
()
->
pdu_session_context_from_json
(
udsf_response
);
...
...
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