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
5d86ed09
Commit
5d86ed09
authored
Jul 26, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use amf_sbi instead of amf_n11
parent
7ac990fa
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
518 additions
and
497 deletions
+518
-497
src/amf-app/CMakeLists.txt
src/amf-app/CMakeLists.txt
+1
-1
src/amf-app/amf_app.cpp
src/amf-app/amf_app.cpp
+12
-12
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+34
-33
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+10
-10
src/amf-app/amf_sbi.cpp
src/amf-app/amf_sbi.cpp
+166
-166
src/amf-app/amf_sbi.hpp
src/amf-app/amf_sbi.hpp
+16
-16
src/common/comUt.cpp
src/common/comUt.cpp
+1
-1
src/common/logger.cpp
src/common/logger.cpp
+2
-2
src/common/logger.hpp
src/common/logger.hpp
+2
-2
src/itti/itti_msg.hpp
src/itti/itti_msg.hpp
+9
-10
src/itti/msgs/itti_msg_n11.hpp
src/itti/msgs/itti_msg_n11.hpp
+0
-230
src/itti/msgs/itti_msg_sbi.hpp
src/itti/msgs/itti_msg_sbi.hpp
+252
-1
src/ngap/ngap_app/ngap_message_callback.hpp
src/ngap/ngap_app/ngap_message_callback.hpp
+12
-12
src/sbi/amf_server/impl/N1N2MessageCollectionDocumentApiImpl.cpp
.../amf_server/impl/N1N2MessageCollectionDocumentApiImpl.cpp
+1
-1
No files found.
src/amf-app/CMakeLists.txt
View file @
5d86ed09
...
...
@@ -50,7 +50,7 @@ file(GLOB AMF_src_files
${
CMAKE_CURRENT_SOURCE_DIR
}
/amf_module_from_config.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/amf_n1.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/amf_n2.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/amf_
n11
.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/amf_
sbi
.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/amf_event.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/amf_profile.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/amf_statistics.cpp
...
...
src/amf-app/amf_app.cpp
View file @
5d86ed09
...
...
@@ -37,7 +37,7 @@
#include "DLNASTransport.hpp"
#include "amf_config.hpp"
#include "amf_n1.hpp"
#include "amf_
n11
.hpp"
#include "amf_
sbi
.hpp"
#include "amf_n2.hpp"
#include "amf_statistics.hpp"
#include "itti.hpp"
...
...
@@ -56,7 +56,7 @@ extern amf_app* amf_app_inst;
extern
itti_mw
*
itti_inst
;
amf_n2
*
amf_n2_inst
=
nullptr
;
amf_n1
*
amf_n1_inst
=
nullptr
;
amf_
n11
*
amf_n11
_inst
=
nullptr
;
amf_
sbi
*
amf_sbi
_inst
=
nullptr
;
extern
amf_config
amf_cfg
;
extern
statistics
stacs
;
...
...
@@ -82,7 +82,7 @@ amf_app::amf_app(const amf_config& amf_cfg)
amf_n1_inst
=
new
amf_n1
();
amf_n2_inst
=
new
amf_n2
(
std
::
string
(
inet_ntoa
(
amf_cfg
.
n2
.
addr4
)),
amf_cfg
.
n2
.
port
);
amf_
n11_inst
=
new
amf_n11
();
amf_
sbi_inst
=
new
amf_sbi
();
}
catch
(
std
::
exception
&
e
)
{
Logger
::
amf_app
().
error
(
"Cannot create AMF APP: %s"
,
e
.
what
());
throw
;
...
...
@@ -1076,18 +1076,18 @@ void amf_app::trigger_nf_registration_request() {
Logger
::
amf_app
().
debug
(
"Send ITTI msg to N11 task to trigger the registration request to NRF"
);
std
::
shared_ptr
<
itti_
n11
_register_nf_instance_request
>
itti_msg
=
std
::
make_shared
<
itti_
n11
_register_nf_instance_request
>
(
TASK_AMF_APP
,
TASK_AMF_
N11
);
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
;
amf_
n11
_inst
->
register_nf_instance
(
itti_msg
);
amf_
sbi
_inst
->
register_nf_instance
(
itti_msg
);
/*
int ret = itti_inst->send_msg(itti_msg);
if (RETURNok != ret) {
Logger::amf_app().error(
"Could not send ITTI message %s to task TASK_AMF_
N11
",
"Could not send ITTI message %s to task TASK_AMF_
SBI
",
itti_msg->get_msg_name());
}
*/
...
...
@@ -1098,14 +1098,14 @@ void amf_app::trigger_nf_deregistration() const {
Logger
::
amf_app
().
debug
(
"Send ITTI msg to N11 task to trigger the deregistration request to NRF"
);
std
::
shared_ptr
<
itti_
n11
_deregister_nf_instance
>
itti_msg
=
std
::
make_shared
<
itti_
n11
_deregister_nf_instance
>
(
TASK_AMF_APP
,
TASK_AMF_
N11
);
std
::
shared_ptr
<
itti_
sbi
_deregister_nf_instance
>
itti_msg
=
std
::
make_shared
<
itti_
sbi
_deregister_nf_instance
>
(
TASK_AMF_APP
,
TASK_AMF_
SBI
);
itti_msg
->
amf_instance_id
=
amf_instance_id
;
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
if
(
RETURNok
!=
ret
)
{
Logger
::
amf_app
().
error
(
"Could not send ITTI message %s to task TASK_AMF_
N11
"
,
"Could not send ITTI message %s to task TASK_AMF_
SBI
"
,
itti_msg
->
get_msg_name
());
}
}
...
...
src/amf-app/amf_n1.cpp
View file @
5d86ed09
...
...
@@ -54,7 +54,7 @@
#include "ULNASTransport.hpp"
#include "amf_app.hpp"
#include "amf_config.hpp"
#include "amf_
n11
.hpp"
#include "amf_
sbi
.hpp"
#include "amf_n2.hpp"
#include "comUt.hpp"
#include "itti.hpp"
...
...
@@ -79,7 +79,7 @@ using namespace config;
extern
itti_mw
*
itti_inst
;
extern
amf_n1
*
amf_n1_inst
;
extern
amf_
n11
*
amf_n11
_inst
;
extern
amf_
sbi
*
amf_sbi
_inst
;
extern
amf_config
amf_cfg
;
extern
amf_app
*
amf_app_inst
;
extern
amf_n2
*
amf_n2_inst
;
...
...
@@ -1772,7 +1772,8 @@ bool amf_n1::get_authentication_vectors_from_ausf(
uint8_t
http_version
=
1
;
if
(
amf_cfg
.
support_features
.
use_http2
)
http_version
=
2
;
if
(
amf_n11_inst
->
send_ue_authentication_request
(
//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
(
ueauthenticationctx
.
getR5gAuthData
().
getRand
());
...
...
@@ -1850,7 +1851,7 @@ bool amf_n1::_5g_aka_confirmation_from_ausf(
uint32_t
response_code
=
0
;
if
(
amf_cfg
.
support_features
.
use_http2
)
http_version
=
2
;
amf_
n11
_inst
->
curl_http_client
(
amf_
sbi
_inst
->
curl_http_client
(
remoteUri
,
"PUT"
,
msgBody
,
response
,
response_code
,
http_version
);
free_wrapper
((
void
**
)
&
resStar_s
);
...
...
@@ -2987,7 +2988,7 @@ void amf_n1::ue_initiate_de_registration_handle(
for
(
auto
session
:
sessions_ctx
)
{
std
::
shared_ptr
<
itti_nsmf_pdusession_release_sm_context
>
itti_msg
=
std
::
make_shared
<
itti_nsmf_pdusession_release_sm_context
>
(
TASK_AMF_N1
,
TASK_AMF_
N11
);
TASK_AMF_N1
,
TASK_AMF_
SBI
);
// Generate a promise and associate this promise to the ITTI message
uint32_t
promise_id
=
amf_app_inst
->
generate_promise_id
();
...
...
@@ -3009,7 +3010,7 @@ void amf_n1::ue_initiate_de_registration_handle(
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
if
(
0
!=
ret
)
{
Logger
::
amf_n1
().
error
(
"Could not send ITTI message %s to task TASK_AMF_
N11
"
,
"Could not send ITTI message %s to task TASK_AMF_
SBI
"
,
itti_msg
->
get_msg_name
());
}
}
...
...
@@ -3187,7 +3188,7 @@ void amf_n1::ul_nas_transport_handle(
std
::
shared_ptr
<
itti_nsmf_pdusession_create_sm_context
>
itti_msg
=
std
::
make_shared
<
itti_nsmf_pdusession_create_sm_context
>
(
TASK_AMF_N1
,
TASK_AMF_
N11
);
TASK_AMF_N1
,
TASK_AMF_
SBI
);
itti_msg
->
ran_ue_ngap_id
=
ran_ue_ngap_id
;
itti_msg
->
amf_ue_ngap_id
=
amf_ue_ngap_id
;
itti_msg
->
req_type
=
request_type
;
...
...
@@ -3202,7 +3203,7 @@ void amf_n1::ul_nas_transport_handle(
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
if
(
0
!=
ret
)
{
Logger
::
amf_n1
().
error
(
"Could not send ITTI message %s to task TASK_AMF_
N11
"
,
"Could not send ITTI message %s to task TASK_AMF_
SBI
"
,
itti_msg
->
get_msg_name
());
}
...
...
@@ -3489,7 +3490,7 @@ void amf_n1::handle_ue_location_change(
std
::
shared_ptr
<
itti_sbi_notify_subscribed_event
>
itti_msg
=
std
::
make_shared
<
itti_sbi_notify_subscribed_event
>
(
TASK_AMF_N1
,
TASK_AMF_
N11
);
TASK_AMF_N1
,
TASK_AMF_
SBI
);
itti_msg
->
http_version
=
1
;
...
...
@@ -3519,7 +3520,7 @@ void amf_n1::handle_ue_location_change(
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
if
(
0
!=
ret
)
{
Logger
::
amf_n1
().
error
(
"Could not send ITTI message %s to task TASK_AMF_
N11
"
,
"Could not send ITTI message %s to task TASK_AMF_
SBI
"
,
itti_msg
->
get_msg_name
());
}
}
...
...
@@ -3544,7 +3545,7 @@ void amf_n1::handle_ue_reachability_status_change(
std
::
shared_ptr
<
itti_sbi_notify_subscribed_event
>
itti_msg
=
std
::
make_shared
<
itti_sbi_notify_subscribed_event
>
(
TASK_AMF_N1
,
TASK_AMF_
N11
);
TASK_AMF_N1
,
TASK_AMF_
SBI
);
itti_msg
->
http_version
=
1
;
...
...
@@ -3579,7 +3580,7 @@ void amf_n1::handle_ue_reachability_status_change(
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
if
(
0
!=
ret
)
{
Logger
::
amf_n1
().
error
(
"Could not send ITTI message %s to task TASK_AMF_
N11
"
,
"Could not send ITTI message %s to task TASK_AMF_
SBI
"
,
itti_msg
->
get_msg_name
());
}
}
...
...
@@ -3604,7 +3605,7 @@ void amf_n1::handle_ue_registration_state_change(
std
::
shared_ptr
<
itti_sbi_notify_subscribed_event
>
itti_msg
=
std
::
make_shared
<
itti_sbi_notify_subscribed_event
>
(
TASK_AMF_N1
,
TASK_AMF_
N11
);
TASK_AMF_N1
,
TASK_AMF_
SBI
);
itti_msg
->
http_version
=
1
;
...
...
@@ -3646,7 +3647,7 @@ void amf_n1::handle_ue_registration_state_change(
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
if
(
0
!=
ret
)
{
Logger
::
amf_n1
().
error
(
"Could not send ITTI message %s to task TASK_AMF_
N11
"
,
"Could not send ITTI message %s to task TASK_AMF_
SBI
"
,
itti_msg
->
get_msg_name
());
}
}
...
...
@@ -3671,7 +3672,7 @@ void amf_n1::handle_ue_connectivity_state_change(
std
::
shared_ptr
<
itti_sbi_notify_subscribed_event
>
itti_msg
=
std
::
make_shared
<
itti_sbi_notify_subscribed_event
>
(
TASK_AMF_N1
,
TASK_AMF_
N11
);
TASK_AMF_N1
,
TASK_AMF_
SBI
);
itti_msg
->
http_version
=
1
;
...
...
@@ -3712,7 +3713,7 @@ void amf_n1::handle_ue_connectivity_state_change(
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
if
(
0
!=
ret
)
{
Logger
::
amf_n1
().
error
(
"Could not send ITTI message %s to task TASK_AMF_
N11
"
,
"Could not send ITTI message %s to task TASK_AMF_
SBI
"
,
itti_msg
->
get_msg_name
());
}
}
...
...
@@ -3940,14 +3941,14 @@ void amf_n1::implicit_deregistration_timer_timeout(
for
(
auto
p
:
pdu_sessions
)
{
std
::
shared_ptr
<
itti_nsmf_pdusession_release_sm_context
>
itti_msg
=
std
::
make_shared
<
itti_nsmf_pdusession_release_sm_context
>
(
TASK_AMF_N1
,
TASK_AMF_
N11
);
TASK_AMF_N1
,
TASK_AMF_
SBI
);
itti_msg
->
supi
=
uc
->
supi
;
itti_msg
->
pdu_session_id
=
p
->
pdu_session_id
;
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
if
(
0
!=
ret
)
{
Logger
::
amf_n1
().
error
(
"Could not send ITTI message %s to task TASK_AMF_
N11
"
,
"Could not send ITTI message %s to task TASK_AMF_
SBI
"
,
itti_msg
->
get_msg_name
());
}
}
...
...
@@ -4286,9 +4287,9 @@ bool amf_n1::get_slice_selection_subscription_data(
return
false
;
}
std
::
shared_ptr
<
itti_
n11
_slice_selection_subscription_data
>
itti_msg
=
std
::
make_shared
<
itti_
n11
_slice_selection_subscription_data
>
(
TASK_AMF_N1
,
TASK_AMF_
N11
);
std
::
shared_ptr
<
itti_
sbi
_slice_selection_subscription_data
>
itti_msg
=
std
::
make_shared
<
itti_
sbi
_slice_selection_subscription_data
>
(
TASK_AMF_N1
,
TASK_AMF_
SBI
);
// Generate a promise and associate this promise to the ITTI message
uint32_t
promise_id
=
amf_app_inst
->
generate_promise_id
();
...
...
@@ -4308,7 +4309,7 @@ bool amf_n1::get_slice_selection_subscription_data(
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
if
(
0
!=
ret
)
{
Logger
::
amf_n1
().
error
(
"Could not send ITTI message %s to task TASK_AMF_
N11
"
,
"Could not send ITTI message %s to task TASK_AMF_
SBI
"
,
itti_msg
->
get_msg_name
());
}
...
...
@@ -4428,9 +4429,9 @@ bool amf_n1::get_network_slice_selection(
if
(
amf_cfg
.
support_features
.
enable_external_nssf
)
{
// Get Authorized Network Slice Info from an external NSSF
std
::
shared_ptr
<
itti_
n11
_network_slice_selection_information
>
itti_msg
=
std
::
make_shared
<
itti_
n11
_network_slice_selection_information
>
(
TASK_AMF_N1
,
TASK_AMF_
N11
);
std
::
shared_ptr
<
itti_
sbi
_network_slice_selection_information
>
itti_msg
=
std
::
make_shared
<
itti_
sbi
_network_slice_selection_information
>
(
TASK_AMF_N1
,
TASK_AMF_
SBI
);
// Generate a promise and associate this promise to the ITTI message
uint32_t
promise_id
=
amf_app_inst
->
generate_promise_id
();
...
...
@@ -4454,7 +4455,7 @@ bool amf_n1::get_network_slice_selection(
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
if
(
0
!=
ret
)
{
Logger
::
amf_n1
().
error
(
"Could not send ITTI message %s to task TASK_AMF_
N11
"
,
"Could not send ITTI message %s to task TASK_AMF_
SBI
"
,
itti_msg
->
get_msg_name
());
}
...
...
@@ -4555,9 +4556,9 @@ bool amf_n1::get_target_amf(
}
// Get list of AMF candidates from NRF
std
::
shared_ptr
<
itti_
n11
_nf_instance_discovery
>
itti_msg
=
std
::
make_shared
<
itti_
n11
_nf_instance_discovery
>
(
TASK_AMF_N1
,
TASK_AMF_
N11
);
std
::
shared_ptr
<
itti_
sbi
_nf_instance_discovery
>
itti_msg
=
std
::
make_shared
<
itti_
sbi
_nf_instance_discovery
>
(
TASK_AMF_N1
,
TASK_AMF_
SBI
);
// Generate a promise and associate this promise to the ITTI message
uint32_t
promise_id
=
amf_app_inst
->
generate_promise_id
();
...
...
@@ -4578,7 +4579,7 @@ bool amf_n1::get_target_amf(
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
if
(
0
!=
ret
)
{
Logger
::
amf_n1
().
error
(
"Could not send ITTI message %s to task TASK_AMF_
N11
"
,
"Could not send ITTI message %s to task TASK_AMF_
SBI
"
,
itti_msg
->
get_msg_name
());
}
...
...
@@ -4658,8 +4659,8 @@ void amf_n1::send_n1_message_notity(
Logger
::
amf_n1
().
debug
(
"Send a request to N11 to send N1 Message Notify to the target AMF"
);
std
::
shared_ptr
<
itti_
n11
_n1_message_notify
>
itti_msg
=
std
::
make_shared
<
itti_
n11_n1_message_notify
>
(
TASK_AMF_N1
,
TASK_AMF_N11
);
std
::
shared_ptr
<
itti_
sbi
_n1_message_notify
>
itti_msg
=
std
::
make_shared
<
itti_
sbi_n1_message_notify
>
(
TASK_AMF_N1
,
TASK_AMF_SBI
);
itti_msg
->
http_version
=
1
;
if
(
nc
->
registration_request_is_set
)
{
...
...
@@ -4671,7 +4672,7 @@ void amf_n1::send_n1_message_notity(
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
if
(
0
!=
ret
)
{
Logger
::
amf_n1
().
error
(
"Could not send ITTI message %s to task TASK_AMF_
N11
"
,
"Could not send ITTI message %s to task TASK_AMF_
SBI
"
,
itti_msg
->
get_msg_name
());
}
}
...
...
src/amf-app/amf_n2.cpp
View file @
5d86ed09
...
...
@@ -48,7 +48,7 @@
#include "amf_app.hpp"
#include "amf_config.hpp"
#include "amf_n1.hpp"
#include "amf_
n11
.hpp"
#include "amf_
sbi
.hpp"
#include "amf_statistics.hpp"
#include "comUt.hpp"
#include "itti.hpp"
...
...
@@ -1605,10 +1605,10 @@ bool amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
Logger
::
amf_n2
().
debug
(
"Sending ITTI to trigger PDUSessionUpdateSMContextRequest to SMF to "
"task TASK_AMF_
N11
"
);
"task TASK_AMF_
SBI
"
);
std
::
shared_ptr
<
itti_nsmf_pdusession_update_sm_context
>
itti_msg
=
std
::
make_shared
<
itti_nsmf_pdusession_update_sm_context
>
(
TASK_NGAP
,
TASK_AMF_
N11
);
TASK_NGAP
,
TASK_AMF_
SBI
);
itti_msg
->
pdu_session_id
=
pduSessionIDValue
;
itti_msg
->
n2sm
=
...
...
@@ -1623,7 +1623,7 @@ bool amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
if
(
0
!=
ret
)
{
Logger
::
ngap
().
error
(
"Could not send ITTI message %s to task TASK_AMF_
N11
"
,
"Could not send ITTI message %s to task TASK_AMF_
SBI
"
,
itti_msg
->
get_msg_name
());
}
}
...
...
@@ -1766,10 +1766,10 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
Logger
::
amf_n2
().
debug
(
"Sending ITTI to trigger PDUSessionUpdateSMContextRequest to SMF to "
"task TASK_AMF_
N11
"
);
"task TASK_AMF_
SBI
"
);
std
::
shared_ptr
<
itti_nsmf_pdusession_update_sm_context
>
itti_msg
=
std
::
make_shared
<
itti_nsmf_pdusession_update_sm_context
>
(
TASK_NGAP
,
TASK_AMF_
N11
);
TASK_NGAP
,
TASK_AMF_
SBI
);
itti_msg
->
pdu_session_id
=
pdu_session_resource
.
pduSessionId
;
itti_msg
->
n2sm
=
blk2bstr
(
...
...
@@ -1785,7 +1785,7 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
if
(
0
!=
ret
)
{
Logger
::
ngap
().
error
(
"Could not send ITTI message %s to task TASK_AMF_
N11
"
,
"Could not send ITTI message %s to task TASK_AMF_
SBI
"
,
itti_msg
->
get_msg_name
());
}
}
...
...
@@ -1931,11 +1931,11 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) {
Logger
::
amf_n2
().
debug
(
"Sending ITTI to trigger PDUSessionUpdateSMContextRequest to SMF to "
"task TASK_AMF_
N11
"
);
"task TASK_AMF_
SBI
"
);
std
::
shared_ptr
<
itti_nsmf_pdusession_update_sm_context
>
itti_n11_msg
=
std
::
make_shared
<
itti_nsmf_pdusession_update_sm_context
>
(
TASK_NGAP
,
TASK_AMF_
N11
);
TASK_NGAP
,
TASK_AMF_
SBI
);
itti_n11_msg
->
pdu_session_id
=
pdu_session
.
get
()
->
pdu_session_id
;
...
...
@@ -1952,7 +1952,7 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) {
int
ret
=
itti_inst
->
send_msg
(
itti_n11_msg
);
if
(
0
!=
ret
)
{
Logger
::
ngap
().
error
(
"Could not send ITTI message %s to task TASK_AMF_
N11
"
,
"Could not send ITTI message %s to task TASK_AMF_
SBI
"
,
itti_n11_msg
->
get_msg_name
());
}
}
...
...
src/amf-app/amf_
n11
.cpp
→
src/amf-app/amf_
sbi
.cpp
View file @
5d86ed09
This diff is collapsed.
Click to expand it.
src/amf-app/amf_
n11
.hpp
→
src/amf-app/amf_
sbi
.hpp
View file @
5d86ed09
...
...
@@ -19,15 +19,15 @@
* contact@openairinterface.org
*/
/*! \file amf_
n11
.hpp
/*! \file amf_
sbi
.hpp
\brief
\author Keliang DU (BUPT), Tien-Thinh NGUYEN (EURECOM)
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _AMF_
N11
_H_
#define _AMF_
N11
_H_
#ifndef _AMF_
SBI
_H_
#define _AMF_
SBI
_H_
#include <map>
#include <shared_mutex>
...
...
@@ -45,10 +45,10 @@
namespace
amf_application
{
class
amf_
n11
{
class
amf_
sbi
{
public:
amf_
n11
();
~
amf_
n11
();
amf_
sbi
();
~
amf_
sbi
();
/*
* Handle ITTI message (Nsmf_PDUSessionCreateSMContext) to create a new PDU
...
...
@@ -90,34 +90,34 @@ class amf_n11 {
/*
* Handle ITTI message to get the Slice Selection Subscription Data from UDM
* @param [itti_
n11
_slice_selection_subscription_data&]: ITTI message
* @param [itti_
sbi
_slice_selection_subscription_data&]: ITTI message
* @return void
*/
void
handle_itti_message
(
itti_
n11
_slice_selection_subscription_data
&
itti_msg
);
itti_
sbi
_slice_selection_subscription_data
&
itti_msg
);
/*
* Handle ITTI message to get the Network Slice Selection Information from
* NSSF
* @param [itti_
n11
_network_slice_selection_information&]: ITTI message
* @param [itti_
sbi
_network_slice_selection_information&]: ITTI message
* @return void
*/
void
handle_itti_message
(
itti_
n11
_network_slice_selection_information
&
itti_msg
);
itti_
sbi
_network_slice_selection_information
&
itti_msg
);
/*
* Handle ITTI message to reroute N1 message to the targer AMF
* @param [itti_
n11
_n1_message_notify&]: ITTI message
* @param [itti_
sbi
_n1_message_notify&]: ITTI message
* @return void
*/
void
handle_itti_message
(
itti_
n11
_n1_message_notify
&
itti_msg
);
void
handle_itti_message
(
itti_
sbi
_n1_message_notify
&
itti_msg
);
/*
* Handle ITTI message to discover NF instance information from NRF
* @param [itti_
n11
_nf_instance_discovery&]: ITTI message
* @param [itti_
sbi
_nf_instance_discovery&]: ITTI message
* @return void
*/
void
handle_itti_message
(
itti_
n11
_nf_instance_discovery
&
itti_msg
);
void
handle_itti_message
(
itti_
sbi
_nf_instance_discovery
&
itti_msg
);
/*
* Handle request to create a new PDU Session
...
...
@@ -151,11 +151,11 @@ class amf_n11 {
/*
* Handle ITTI message to register to NRF
* @param [itti_
n11
_register_nf_instance_request&]: ITTI message
* @param [itti_
sbi
_register_nf_instance_request&]: ITTI message
* @return void
*/
void
register_nf_instance
(
std
::
shared_ptr
<
itti_
n11
_register_nf_instance_request
>
msg
);
std
::
shared_ptr
<
itti_
sbi
_register_nf_instance_request
>
msg
);
/*
* Send the request to update PDU session context at SMF
...
...
src/common/comUt.cpp
View file @
5d86ed09
...
...
@@ -36,7 +36,7 @@ void comUt::print_buffer(
if
(
!
app
.
compare
(
"amf_app"
))
Logger
::
amf_app
().
debug
(
commit
.
c_str
());
if
(
!
app
.
compare
(
"amf_n1"
))
Logger
::
amf_n1
().
debug
(
commit
.
c_str
());
if
(
!
app
.
compare
(
"amf_server"
))
Logger
::
amf_server
().
debug
(
commit
.
c_str
());
if
(
!
app
.
compare
(
"amf_
n11"
))
Logger
::
amf_n11
().
debug
(
commit
.
c_str
());
if
(
!
app
.
compare
(
"amf_
sbi"
))
Logger
::
amf_sbi
().
debug
(
commit
.
c_str
());
#if DEBUG_IS_ON
for
(
int
i
=
0
;
i
<
len
;
i
++
)
printf
(
"%x "
,
buf
[
i
]);
printf
(
"
\n
"
);
...
...
src/common/logger.cpp
View file @
5d86ed09
...
...
@@ -76,8 +76,8 @@ void Logger::_init(
m_itti
=
new
_Logger
(
"itti "
,
m_sinks
,
ss
.
str
().
c_str
());
m_amf_n2
=
new
_Logger
(
"amf_n2 "
,
m_sinks
,
ss
.
str
().
c_str
());
m_amf_n1
=
new
_Logger
(
"amf_n1 "
,
m_sinks
,
ss
.
str
().
c_str
());
m_amf_
n11
=
new
_Logger
(
"amf_n11
"
,
m_sinks
,
ss
.
str
().
c_str
());
m_amf_server
=
new
_Logger
(
"amf_s
bi
"
,
m_sinks
,
ss
.
str
().
c_str
());
m_amf_
sbi
=
new
_Logger
(
"amf_sbi
"
,
m_sinks
,
ss
.
str
().
c_str
());
m_amf_server
=
new
_Logger
(
"amf_s
erver
"
,
m_sinks
,
ss
.
str
().
c_str
());
}
//------------------------------------------------------------------------------
...
...
src/common/logger.hpp
View file @
5d86ed09
...
...
@@ -92,7 +92,7 @@ class Logger {
static
_Logger
&
itti
()
{
return
*
singleton
().
m_itti
;
}
static
_Logger
&
amf_n2
()
{
return
*
singleton
().
m_amf_n2
;
}
static
_Logger
&
amf_n1
()
{
return
*
singleton
().
m_amf_n1
;
}
static
_Logger
&
amf_
n11
()
{
return
*
singleton
().
m_amf_n11
;
}
static
_Logger
&
amf_
sbi
()
{
return
*
singleton
().
m_amf_sbi
;
}
static
_Logger
&
amf_server
()
{
return
*
singleton
().
m_amf_server
;
}
private:
...
...
@@ -121,7 +121,7 @@ class Logger {
_Logger
*
m_itti
;
_Logger
*
m_amf_n2
;
_Logger
*
m_amf_n1
;
_Logger
*
m_amf_
n11
;
_Logger
*
m_amf_
sbi
;
_Logger
*
m_amf_server
;
};
...
...
src/itti/itti_msg.hpp
View file @
5d86ed09
...
...
@@ -38,7 +38,6 @@ typedef enum {
TASK_NGAP
,
TASK_AMF_N2
,
TASK_AMF_N1
,
TASK_AMF_N11
,
TASK_AMF_APP
,
TASK_AMF_SBI
,
AMF_SERVER
,
...
...
@@ -85,15 +84,15 @@ typedef enum {
REROUTE_NAS_REQ
,
NSMF_PDU_SESSION_CREATE_SM_CTX
,
NSMF_PDU_SESSION_UPDATE_SM_CTX
,
N11_REGISTER_NF_INSTANCE_REQUEST
,
N11_REGISTER_NF_INSTANCE_RESPONSE
,
N11_UPDATE_NF_INSTANCE_REQUEST
,
N11_UPDATE_NF_INSTANCE_RESPONSE
,
N11_DEREGISTER_NF_INSTANC
E
,
N11_SLICE_SELECTION_SUBSCRIPTION_DATA
,
N11_NETWORK_SLICE_SELECTION_INFORMATION
,
N11_NF_INSTANCE_DISCOVERY
,
N11_N1_MESSAGE_NOTIF
Y
,
SBI_N1_MESSAGE_NOTIFY
,
SBI_REGISTER_NF_INSTANCE_REQUEST
,
SBI_REGISTER_NF_INSTANCE_RESPONSE
,
SBI_UPDATE_NF_INSTANCE_REQUEST
,
SBI_UPDATE_NF_INSTANCE_RESPONS
E
,
SBI_DEREGISTER_NF_INSTANCE
,
SBI_SLICE_SELECTION_SUBSCRIPTION_DATA
,
SBI_NETWORK_SLICE_SELECTION_INFORMATION
,
SBI_NF_INSTANCE_DISCOVER
Y
,
SBI_AMF_CONFIGURATION
,
SBI_UPDATE_AMF_CONFIGURATION
,
SBI_EVENT_EXPOSURE_REQUEST
,
...
...
src/itti/msgs/itti_msg_n11.hpp
View file @
5d86ed09
...
...
@@ -30,236 +30,6 @@
#include "itti_msg.hpp"
#include "SliceInfoForRegistration.h"
class
itti_msg_n11
:
public
itti_msg
{
public:
itti_msg_n11
(
const
itti_msg_type_t
msg_type
,
const
task_id_t
origin
,
const
task_id_t
destination
)
:
itti_msg
(
msg_type
,
origin
,
destination
)
{}
itti_msg_n11
(
const
itti_msg_n11
&
i
)
:
itti_msg
(
i
)
{
ran_ue_ngap_id
=
i
.
ran_ue_ngap_id
;
amf_ue_ngap_id
=
i
.
amf_ue_ngap_id
;
}
public:
long
amf_ue_ngap_id
;
uint32_t
ran_ue_ngap_id
;
};
class
itti_nsmf_pdusession_create_sm_context
:
public
itti_msg_n11
{
public:
itti_nsmf_pdusession_create_sm_context
(
const
task_id_t
origin
,
const
task_id_t
destination
)
:
itti_msg_n11
(
NSMF_PDU_SESSION_CREATE_SM_CTX
,
origin
,
destination
)
{}
itti_nsmf_pdusession_create_sm_context
(
const
itti_nsmf_pdusession_create_sm_context
&
i
)
:
itti_msg_n11
(
i
)
{}
public:
uint8_t
req_type
;
uint8_t
pdu_sess_id
;
bstring
dnn
;
bstring
sm_msg
;
snssai_t
snssai
;
plmn_t
plmn
;
};
class
itti_pdu_session_resource_setup_response
:
public
itti_msg_n11
{
public:
itti_pdu_session_resource_setup_response
(
const
task_id_t
origin
,
const
task_id_t
destination
)
:
itti_msg_n11
(
PDU_SESSION_RESOURCE_SETUP_RESPONSE
,
origin
,
destination
)
{
}
itti_pdu_session_resource_setup_response
(
const
itti_pdu_session_resource_setup_response
&
i
)
:
itti_msg_n11
(
i
)
{}
public:
uint8_t
pdu_session_id
;
bstring
n2sm
;
};
class
itti_nsmf_pdusession_update_sm_context
:
public
itti_msg_n11
{
public:
itti_nsmf_pdusession_update_sm_context
(
const
task_id_t
origin
,
const
task_id_t
destination
)
:
itti_msg_n11
(
NSMF_PDU_SESSION_UPDATE_SM_CTX
,
origin
,
destination
)
{
is_n2sm_set
=
false
;
promise_id
=
0
;
}
itti_nsmf_pdusession_update_sm_context
(
const
itti_nsmf_pdusession_update_sm_context
&
i
)
:
itti_msg_n11
(
i
)
{
pdu_session_id
=
i
.
pdu_session_id
;
n2sm
=
i
.
n2sm
;
is_n2sm_set
=
i
.
is_n2sm_set
;
n2sm_info_type
=
i
.
n2sm_info_type
;
promise_id
=
i
.
promise_id
;
}
public:
std
::
string
supi
;
uint8_t
pdu_session_id
;
bstring
n2sm
;
bool
is_n2sm_set
;
std
::
string
n2sm_info_type
;
uint32_t
ran_ue_ngap_id
;
long
amf_ue_ngap_id
;
uint32_t
promise_id
;
std
::
string
ho_state
;
};
class
itti_nsmf_pdusession_release_sm_context
:
public
itti_msg_n11
{
public:
itti_nsmf_pdusession_release_sm_context
(
const
task_id_t
origin
,
const
task_id_t
destination
)
:
itti_msg_n11
(
NSMF_PDU_SESSION_RELEASE_SM_CTX
,
origin
,
destination
)
{}
itti_nsmf_pdusession_release_sm_context
(
const
itti_nsmf_pdusession_release_sm_context
&
i
)
:
itti_msg_n11
(
i
)
{
supi
=
i
.
supi
;
pdu_session_id
=
i
.
pdu_session_id
;
promise_id
=
i
.
promise_id
;
context_location
=
i
.
context_location
;
}
public:
std
::
string
supi
;
uint8_t
pdu_session_id
;
uint32_t
promise_id
;
std
::
string
context_location
;
};
//-----------------------------------------------------------------------------
class
itti_n11_register_nf_instance_request
:
public
itti_msg_n11
{
public:
itti_n11_register_nf_instance_request
(
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_msg_n11
(
N11_REGISTER_NF_INSTANCE_REQUEST
,
orig
,
dest
),
http_version
(
1
)
{}
const
char
*
get_msg_name
()
{
return
"N11_REGISTER_NF_INSTANCE_REQUEST"
;
};
amf_application
::
amf_profile
profile
;
uint8_t
http_version
;
};
//-----------------------------------------------------------------------------
class
itti_n11_register_nf_instance_response
:
public
itti_msg_n11
{
public:
itti_n11_register_nf_instance_response
(
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_msg_n11
(
N11_REGISTER_NF_INSTANCE_RESPONSE
,
orig
,
dest
),
http_version
(
1
)
{}
const
char
*
get_msg_name
()
{
return
"N11_REGISTER_NF_INSTANCE_RESPONSE"
;
};
amf_application
::
amf_profile
profile
;
uint8_t
http_version
;
uint8_t
http_response_code
;
};
//-----------------------------------------------------------------------------
class
itti_n11_update_nf_instance_request
:
public
itti_msg_n11
{
public:
itti_n11_update_nf_instance_request
(
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_msg_n11
(
N11_UPDATE_NF_INSTANCE_REQUEST
,
orig
,
dest
),
http_version
(
1
)
{}
const
char
*
get_msg_name
()
{
return
"N11_UPDATE_NF_INSTANCE_REQUEST"
;
};
// std::vector<oai::amf::model::PatchItem> patch_items;
uint8_t
http_version
;
std
::
string
smf_instance_id
;
};
//-----------------------------------------------------------------------------
class
itti_n11_update_nf_instance_response
:
public
itti_msg_n11
{
public:
itti_n11_update_nf_instance_response
(
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_msg_n11
(
N11_UPDATE_NF_INSTANCE_RESPONSE
,
orig
,
dest
),
http_version
(
1
)
{}
const
char
*
get_msg_name
()
{
return
"N11_UPDATE_NF_INSTANCE_RESPONSE"
;
};
uint8_t
http_version
;
std
::
string
amf_instance_id
;
uint8_t
http_response_code
;
};
//-----------------------------------------------------------------------------
class
itti_n11_deregister_nf_instance
:
public
itti_msg_n11
{
public:
itti_n11_deregister_nf_instance
(
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_msg_n11
(
N11_DEREGISTER_NF_INSTANCE
,
orig
,
dest
),
http_version
(
1
)
{}
const
char
*
get_msg_name
()
{
return
"N11_DEREGISTER_NF_INSTANCE"
;
};
uint8_t
http_version
;
std
::
string
amf_instance_id
;
};
//-----------------------------------------------------------------------------
class
itti_n11_slice_selection_subscription_data
:
public
itti_msg_n11
{
public:
itti_n11_slice_selection_subscription_data
(
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_msg_n11
(
N11_SLICE_SELECTION_SUBSCRIPTION_DATA
,
orig
,
dest
),
http_version
(
1
)
{}
const
char
*
get_msg_name
()
{
return
"N11_SLICE_SELECTION_SUBSCRIPTION_DATA"
;
};
uint8_t
http_version
;
std
::
string
supi
;
plmn_t
plmn
;
uint32_t
promise_id
;
};
//-----------------------------------------------------------------------------
class
itti_n11_network_slice_selection_information
:
public
itti_msg_n11
{
public:
itti_n11_network_slice_selection_information
(
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_msg_n11
(
N11_NETWORK_SLICE_SELECTION_INFORMATION
,
orig
,
dest
),
http_version
(
1
)
{}
const
char
*
get_msg_name
()
{
return
"N11_NETWORK_SLICE_SELECTION_INFORMATION"
;
};
uint8_t
http_version
;
std
::
string
nf_instance_id
;
oai
::
amf
::
model
::
SliceInfoForRegistration
slice_info
;
// plmn_t plmn;
tai_t
tai
;
uint32_t
promise_id
;
};
//-----------------------------------------------------------------------------
class
itti_n11_nf_instance_discovery
:
public
itti_msg_n11
{
public:
itti_n11_nf_instance_discovery
(
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_msg_n11
(
N11_NF_INSTANCE_DISCOVERY
,
orig
,
dest
),
target_amf_set_is_set
(
false
),
http_version
(
1
)
{}
const
char
*
get_msg_name
()
{
return
"N11_NF_INSTANCE_DISCOVERY"
;
};
uint8_t
http_version
;
std
::
string
target_amf_set
;
bool
target_amf_set_is_set
;
std
::
string
target_nf_type
;
std
::
string
nrf_amf_set
;
uint32_t
promise_id
;
};
//-----------------------------------------------------------------------------
class
itti_n11_n1_message_notify
:
public
itti_msg_n11
{
public:
itti_n11_n1_message_notify
(
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_msg_n11
(
N11_N1_MESSAGE_NOTIFY
,
orig
,
dest
),
http_version
(
1
)
{}
const
char
*
get_msg_name
()
{
return
"N11_N1_MESSAGE_NOTIFY"
;
};
uint8_t
http_version
;
std
::
string
target_amf_uri
;
std
::
string
supi
;
bstring
registration_request
;
};
#endif
src/itti/msgs/itti_msg_sbi.hpp
View file @
5d86ed09
...
...
@@ -20,7 +20,7 @@
*/
/*
* itti_
msg_sbi
.hpp
* itti_
sbi_msg
.hpp
*
* Date: 2021
* Company KCL
...
...
@@ -35,10 +35,118 @@
#include "amf_msg.hpp"
#include "N1MessageNotification.h"
#include "UeN1N2InfoSubscriptionCreateData.h"
#include "amf.hpp"
#include "amf_profile.hpp"
#include "bstrlib.h"
#include "itti_msg.hpp"
#include "SliceInfoForRegistration.h"
// using namespace oai::amf::model;
using
namespace
amf_application
;
class
itti_msg_n11
:
public
itti_msg
{
public:
itti_msg_n11
(
const
itti_msg_type_t
msg_type
,
const
task_id_t
origin
,
const
task_id_t
destination
)
:
itti_msg
(
msg_type
,
origin
,
destination
)
{}
itti_msg_n11
(
const
itti_msg_n11
&
i
)
:
itti_msg
(
i
)
{
ran_ue_ngap_id
=
i
.
ran_ue_ngap_id
;
amf_ue_ngap_id
=
i
.
amf_ue_ngap_id
;
}
public:
long
amf_ue_ngap_id
;
uint32_t
ran_ue_ngap_id
;
};
class
itti_nsmf_pdusession_create_sm_context
:
public
itti_msg_n11
{
public:
itti_nsmf_pdusession_create_sm_context
(
const
task_id_t
origin
,
const
task_id_t
destination
)
:
itti_msg_n11
(
NSMF_PDU_SESSION_CREATE_SM_CTX
,
origin
,
destination
)
{}
itti_nsmf_pdusession_create_sm_context
(
const
itti_nsmf_pdusession_create_sm_context
&
i
)
:
itti_msg_n11
(
i
)
{}
public:
uint8_t
req_type
;
uint8_t
pdu_sess_id
;
bstring
dnn
;
bstring
sm_msg
;
snssai_t
snssai
;
plmn_t
plmn
;
};
class
itti_pdu_session_resource_setup_response
:
public
itti_msg_n11
{
public:
itti_pdu_session_resource_setup_response
(
const
task_id_t
origin
,
const
task_id_t
destination
)
:
itti_msg_n11
(
PDU_SESSION_RESOURCE_SETUP_RESPONSE
,
origin
,
destination
)
{
}
itti_pdu_session_resource_setup_response
(
const
itti_pdu_session_resource_setup_response
&
i
)
:
itti_msg_n11
(
i
)
{}
public:
uint8_t
pdu_session_id
;
bstring
n2sm
;
};
class
itti_nsmf_pdusession_update_sm_context
:
public
itti_msg_n11
{
public:
itti_nsmf_pdusession_update_sm_context
(
const
task_id_t
origin
,
const
task_id_t
destination
)
:
itti_msg_n11
(
NSMF_PDU_SESSION_UPDATE_SM_CTX
,
origin
,
destination
)
{
is_n2sm_set
=
false
;
promise_id
=
0
;
}
itti_nsmf_pdusession_update_sm_context
(
const
itti_nsmf_pdusession_update_sm_context
&
i
)
:
itti_msg_n11
(
i
)
{
pdu_session_id
=
i
.
pdu_session_id
;
n2sm
=
i
.
n2sm
;
is_n2sm_set
=
i
.
is_n2sm_set
;
n2sm_info_type
=
i
.
n2sm_info_type
;
promise_id
=
i
.
promise_id
;
}
public:
std
::
string
supi
;
uint8_t
pdu_session_id
;
bstring
n2sm
;
bool
is_n2sm_set
;
std
::
string
n2sm_info_type
;
uint32_t
ran_ue_ngap_id
;
long
amf_ue_ngap_id
;
uint32_t
promise_id
;
std
::
string
ho_state
;
};
class
itti_nsmf_pdusession_release_sm_context
:
public
itti_msg_n11
{
public:
itti_nsmf_pdusession_release_sm_context
(
const
task_id_t
origin
,
const
task_id_t
destination
)
:
itti_msg_n11
(
NSMF_PDU_SESSION_RELEASE_SM_CTX
,
origin
,
destination
)
{}
itti_nsmf_pdusession_release_sm_context
(
const
itti_nsmf_pdusession_release_sm_context
&
i
)
:
itti_msg_n11
(
i
)
{
supi
=
i
.
supi
;
pdu_session_id
=
i
.
pdu_session_id
;
promise_id
=
i
.
promise_id
;
context_location
=
i
.
context_location
;
}
public:
std
::
string
supi
;
uint8_t
pdu_session_id
;
uint32_t
promise_id
;
std
::
string
context_location
;
};
class
itti_sbi_msg
:
public
itti_msg
{
public:
itti_sbi_msg
(
...
...
@@ -54,6 +162,149 @@ class itti_sbi_msg : public itti_msg {
}
};
//-----------------------------------------------------------------------------
class
itti_sbi_register_nf_instance_request
:
public
itti_sbi_msg
{
public:
itti_sbi_register_nf_instance_request
(
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_sbi_msg
(
SBI_REGISTER_NF_INSTANCE_REQUEST
,
orig
,
dest
),
http_version
(
1
)
{}
const
char
*
get_msg_name
()
{
return
"SBI_REGISTER_NF_INSTANCE_REQUEST"
;
};
amf_application
::
amf_profile
profile
;
uint8_t
http_version
;
};
//-----------------------------------------------------------------------------
class
itti_sbi_register_nf_instance_response
:
public
itti_sbi_msg
{
public:
itti_sbi_register_nf_instance_response
(
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_sbi_msg
(
SBI_REGISTER_NF_INSTANCE_RESPONSE
,
orig
,
dest
),
http_version
(
1
)
{}
const
char
*
get_msg_name
()
{
return
"SBI_REGISTER_NF_INSTANCE_RESPONSE"
;
};
amf_application
::
amf_profile
profile
;
uint8_t
http_version
;
uint8_t
http_response_code
;
};
//-----------------------------------------------------------------------------
class
itti_sbi_update_nf_instance_request
:
public
itti_sbi_msg
{
public:
itti_sbi_update_nf_instance_request
(
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_sbi_msg
(
SBI_UPDATE_NF_INSTANCE_REQUEST
,
orig
,
dest
),
http_version
(
1
)
{}
const
char
*
get_msg_name
()
{
return
"SBI_UPDATE_NF_INSTANCE_REQUEST"
;
};
// std::vector<oai::amf::model::PatchItem> patch_items;
uint8_t
http_version
;
std
::
string
smf_instance_id
;
};
//-----------------------------------------------------------------------------
class
itti_sbi_update_nf_instance_response
:
public
itti_sbi_msg
{
public:
itti_sbi_update_nf_instance_response
(
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_sbi_msg
(
SBI_UPDATE_NF_INSTANCE_RESPONSE
,
orig
,
dest
),
http_version
(
1
)
{}
const
char
*
get_msg_name
()
{
return
"SBI_UPDATE_NF_INSTANCE_RESPONSE"
;
};
uint8_t
http_version
;
std
::
string
amf_instance_id
;
uint8_t
http_response_code
;
};
//-----------------------------------------------------------------------------
class
itti_sbi_deregister_nf_instance
:
public
itti_sbi_msg
{
public:
itti_sbi_deregister_nf_instance
(
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_sbi_msg
(
SBI_DEREGISTER_NF_INSTANCE
,
orig
,
dest
),
http_version
(
1
)
{}
const
char
*
get_msg_name
()
{
return
"SBI_DEREGISTER_NF_INSTANCE"
;
};
uint8_t
http_version
;
std
::
string
amf_instance_id
;
};
//-----------------------------------------------------------------------------
class
itti_sbi_slice_selection_subscription_data
:
public
itti_sbi_msg
{
public:
itti_sbi_slice_selection_subscription_data
(
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_sbi_msg
(
SBI_SLICE_SELECTION_SUBSCRIPTION_DATA
,
orig
,
dest
),
http_version
(
1
)
{}
const
char
*
get_msg_name
()
{
return
"SBI_SLICE_SELECTION_SUBSCRIPTION_DATA"
;
};
uint8_t
http_version
;
std
::
string
supi
;
plmn_t
plmn
;
uint32_t
promise_id
;
};
//-----------------------------------------------------------------------------
class
itti_sbi_network_slice_selection_information
:
public
itti_sbi_msg
{
public:
itti_sbi_network_slice_selection_information
(
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_sbi_msg
(
SBI_NETWORK_SLICE_SELECTION_INFORMATION
,
orig
,
dest
),
http_version
(
1
)
{}
const
char
*
get_msg_name
()
{
return
"SBI_NETWORK_SLICE_SELECTION_INFORMATION"
;
};
uint8_t
http_version
;
std
::
string
nf_instance_id
;
oai
::
amf
::
model
::
SliceInfoForRegistration
slice_info
;
// plmn_t plmn;
tai_t
tai
;
uint32_t
promise_id
;
};
//-----------------------------------------------------------------------------
class
itti_sbi_nf_instance_discovery
:
public
itti_sbi_msg
{
public:
itti_sbi_nf_instance_discovery
(
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_sbi_msg
(
SBI_NF_INSTANCE_DISCOVERY
,
orig
,
dest
),
target_amf_set_is_set
(
false
),
http_version
(
1
)
{}
const
char
*
get_msg_name
()
{
return
"SBI_NF_INSTANCE_DISCOVERY"
;
};
uint8_t
http_version
;
std
::
string
target_amf_set
;
bool
target_amf_set_is_set
;
std
::
string
target_nf_type
;
std
::
string
nrf_amf_set
;
uint32_t
promise_id
;
};
//-----------------------------------------------------------------------------
class
itti_sbi_n1_message_notify
:
public
itti_sbi_msg
{
public:
itti_sbi_n1_message_notify
(
const
task_id_t
orig
,
const
task_id_t
dest
)
:
itti_sbi_msg
(
SBI_N1_MESSAGE_NOTIFY
,
orig
,
dest
),
http_version
(
1
)
{}
const
char
*
get_msg_name
()
{
return
"SBI_N1_MESSAGE_NOTIFY"
;
};
uint8_t
http_version
;
std
::
string
target_amf_uri
;
std
::
string
supi
;
bstring
registration_request
;
};
//-----------------------------------------------------------------------------
class
itti_sbi_event_exposure_request
:
public
itti_sbi_msg
{
public:
...
...
src/ngap/ngap_app/ngap_message_callback.hpp
View file @
5d86ed09
...
...
@@ -32,7 +32,7 @@
#include "PduSessionResourceModifyResponse.hpp"
#include "amf_app.hpp"
#include "amf_n1.hpp"
#include "amf_
n11
.hpp"
#include "amf_
sbi
.hpp"
#include "itti.hpp"
#include "itti_msg_n11.hpp"
#include "itti_msg_n2.hpp"
...
...
@@ -166,9 +166,9 @@ int ngap_amf_handle_initial_context_setup_response(
transferIe
,
list
[
0
].
pduSessionResourceSetupResponseTransfer
.
size
);
Logger
::
ngap
().
debug
(
"Sending ITTI Initial Context Setup Response to TASK_AMF_
N11
"
);
"Sending ITTI Initial Context Setup Response to TASK_AMF_
SBI
"
);
itti_nsmf_pdusession_update_sm_context
*
itti_msg
=
new
itti_nsmf_pdusession_update_sm_context
(
TASK_NGAP
,
TASK_AMF_
N11
);
new
itti_nsmf_pdusession_update_sm_context
(
TASK_NGAP
,
TASK_AMF_
SBI
);
itti_msg
->
pdu_session_id
=
list
[
0
].
pduSessionId
;
itti_msg
->
n2sm
=
n2sm
;
itti_msg
->
is_n2sm_set
=
true
;
...
...
@@ -181,7 +181,7 @@ int ngap_amf_handle_initial_context_setup_response(
int
ret
=
itti_inst
->
send_msg
(
i
);
if
(
0
!=
ret
)
{
Logger
::
ngap
().
error
(
"Could not send ITTI message %s to task TASK_AMF_
N11
"
,
"Could not send ITTI message %s to task TASK_AMF_
SBI
"
,
i
->
get_msg_name
());
}
return
0
;
...
...
@@ -310,10 +310,10 @@ int ngap_amf_handle_pdu_session_resource_release_response(
bstring
n2sm
=
blk2bstr
(
transferIe
,
list
[
0
].
pduSessionResourceReleaseResponseTransfer
.
size
);
Logger
::
ngap
().
debug
(
"Sending ITTI PDUSessionResourceReleaseResponse to TASK_AMF_
N11
"
);
"Sending ITTI PDUSessionResourceReleaseResponse to TASK_AMF_
SBI
"
);
itti_nsmf_pdusession_update_sm_context
*
itti_msg
=
new
itti_nsmf_pdusession_update_sm_context
(
TASK_NGAP
,
TASK_AMF_
N11
);
new
itti_nsmf_pdusession_update_sm_context
(
TASK_NGAP
,
TASK_AMF_
SBI
);
itti_msg
->
pdu_session_id
=
list
[
0
].
pduSessionId
;
itti_msg
->
n2sm
=
n2sm
;
itti_msg
->
is_n2sm_set
=
true
;
...
...
@@ -326,7 +326,7 @@ int ngap_amf_handle_pdu_session_resource_release_response(
int
ret
=
itti_inst
->
send_msg
(
i
);
if
(
0
!=
ret
)
{
Logger
::
ngap
().
error
(
"Could not send ITTI message %s to task TASK_AMF_
N11
"
,
"Could not send ITTI message %s to task TASK_AMF_
SBI
"
,
i
->
get_msg_name
());
}
return
0
;
...
...
@@ -359,7 +359,7 @@ int ngap_amf_handle_pdu_session_resource_setup_response(
bstring
n2sm
=
blk2bstr
(
transferIe
,
list
[
0
].
pduSessionResourceSetupResponseTransfer
.
size
);
itti_nsmf_pdusession_update_sm_context
*
itti_msg
=
new
itti_nsmf_pdusession_update_sm_context
(
TASK_NGAP
,
TASK_AMF_
N11
);
new
itti_nsmf_pdusession_update_sm_context
(
TASK_NGAP
,
TASK_AMF_
SBI
);
long
amf_ue_ngap_id
=
pduresp
->
getAmfUeNgapId
();
if
(
!
amf_n1_inst
->
is_amf_ue_id_2_nas_context
(
amf_ue_ngap_id
))
{
Logger
::
ngap
().
error
(
...
...
@@ -381,7 +381,7 @@ int ngap_amf_handle_pdu_session_resource_setup_response(
int
ret
=
itti_inst
->
send_msg
(
i
);
if
(
0
!=
ret
)
{
Logger
::
ngap
().
error
(
"Could not send ITTI message %s to task TASK_AMF_
N11
"
,
"Could not send ITTI message %s to task TASK_AMF_
SBI
"
,
i
->
get_msg_name
());
}
return
0
;
...
...
@@ -495,11 +495,11 @@ int ngap_amf_handle_pdu_session_resource_modify_response(
buf
,
response_item
.
pduSessionResourceModifyResponseTransfer
.
size
);
Logger
::
ngap
().
debug
(
"Sending ITTI PDUSessionResourceModifyResponseTransfer to "
"TASK_AMF_
N11
"
);
"TASK_AMF_
SBI
"
);
std
::
shared_ptr
<
itti_nsmf_pdusession_update_sm_context
>
itti_msg
=
std
::
make_shared
<
itti_nsmf_pdusession_update_sm_context
>
(
TASK_NGAP
,
TASK_AMF_
N11
);
TASK_NGAP
,
TASK_AMF_
SBI
);
itti_msg
->
pdu_session_id
=
response_item
.
pduSessionId
;
itti_msg
->
n2sm
=
n2sm
;
itti_msg
->
is_n2sm_set
=
true
;
...
...
@@ -510,7 +510,7 @@ int ngap_amf_handle_pdu_session_resource_modify_response(
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
if
(
0
!=
ret
)
{
Logger
::
ngap
().
error
(
"Could not send ITTI message %s to task TASK_AMF_
N11
"
,
"Could not send ITTI message %s to task TASK_AMF_
SBI
"
,
itti_msg
->
get_msg_name
());
}
}
...
...
src/sbi/amf_server/impl/N1N2MessageCollectionDocumentApiImpl.cpp
View file @
5d86ed09
...
...
@@ -15,7 +15,7 @@
#include "itti.hpp"
#include "amf_app.hpp"
#include "amf_
n11
.hpp"
#include "amf_
sbi
.hpp"
#include "pdu_session_context.hpp"
#include "conversions.hpp"
#include "comUt.hpp"
...
...
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