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
2ee0900c
Commit
2ee0900c
authored
Feb 07, 2022
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add debuging log
parent
f300ca2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
4 deletions
+35
-4
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+28
-4
src/ngap/ngapIEs/NgapIEsStruct.hpp
src/ngap/ngapIEs/NgapIEsStruct.hpp
+7
-0
No files found.
src/amf-app/amf_n1.cpp
View file @
2ee0900c
...
...
@@ -3698,9 +3698,11 @@ bool amf_n1::get_mobile_reachable_timer_timeout(
//------------------------------------------------------------------------------
bool
amf_n1
::
reroute_registration_request
(
std
::
shared_ptr
<
nas_context
>&
nc
)
{
Logger
::
amf_n1
().
debug
(
"Registration with AMF re-allocation, Reroute Registration Request to "
"the target AMF"
);
// Verifying whether this AMF can handle the request (if not, AMF
// re-allocation procedure will be executed to reroute the Registration "
// Request to an appropriate AMF
Logger
::
amf_n1
().
debug
(
"Verifying whether this AMF can handle the request"
);
/*
// Check if the AMF can serve all the requested S-NSSAIs
...
...
@@ -3928,6 +3930,9 @@ bool amf_n1::get_slice_selection_subscription_data(
const
std
::
shared_ptr
<
nas_context
>&
nc
,
oai
::
amf
::
model
::
Nssai
&
nssai
)
{
// TODO: UDM selection (from NRF or configuration file)
if
(
amf_cfg
.
support_features
.
enable_external_udm
)
{
Logger
::
amf_n1
().
debug
(
"Get the Slice Selection Subscription Data from UDM"
);
std
::
shared_ptr
<
ue_context
>
uc
=
{};
if
(
!
find_ue_context
(
nc
.
get
()
->
ran_ue_ngap_id
,
nc
.
get
()
->
amf_ue_ngap_id
,
uc
))
{
...
...
@@ -3994,8 +3999,12 @@ bool amf_n1::get_slice_selection_subscription_data(
//------------------------------------------------------------------------------
bool
amf_n1
::
get_slice_selection_subscription_data_from_conf_file
(
const
std
::
shared_ptr
<
nas_context
>&
nc
,
oai
::
amf
::
model
::
Nssai
&
nssai
)
{
Logger
::
amf_n1
().
debug
(
"Get the Slice Selection Subscription Data from configuration file"
);
// For now, use the common NSSAIs, supported by AMF and gNB, as subscribed
// NSSAIs
std
::
shared_ptr
<
ue_context
>
uc
=
{};
if
(
!
find_ue_context
(
nc
.
get
()
->
ran_ue_ngap_id
,
nc
.
get
()
->
amf_ue_ngap_id
,
uc
))
{
...
...
@@ -4031,6 +4040,8 @@ bool amf_n1::get_slice_selection_subscription_data_from_conf_file(
}
nssai
.
setSst
(
sst
);
nssai
.
setSd
(
s
.
sd
);
Logger
::
amf_n1
().
debug
(
"Added S-NSSAI (SST %d, SD %s)"
,
sst
,
s
.
sd
.
c_str
());
common_snssais
.
push_back
(
nssai
);
}
}
...
...
@@ -4039,7 +4050,7 @@ bool amf_n1::get_slice_selection_subscription_data_from_conf_file(
// Print out the list of subscribed NSSAIs
for
(
auto
n
:
nssai
.
getDefaultSingleNssais
())
{
Logger
::
amf_n1
().
debug
(
"
Found
S-NSSAI (SST %d, SD %s)"
,
n
.
getSst
(),
n
.
getSd
().
c_str
());
"S-NSSAI (SST %d, SD %s)"
,
n
.
getSst
(),
n
.
getSd
().
c_str
());
}
return
true
;
...
...
@@ -4051,6 +4062,9 @@ bool amf_n1::get_network_slice_selection(
const
oai
::
amf
::
model
::
SliceInfoForRegistration
&
slice_info
,
oai
::
amf
::
model
::
AuthorizedNetworkSliceInfo
&
authorized_network_slice_info
)
{
Logger
::
amf_n1
().
debug
(
"Get the Network Slice Selection Information from NSSF"
);
std
::
shared_ptr
<
ue_context
>
uc
=
{};
if
(
!
find_ue_context
(
nc
.
get
()
->
ran_ue_ngap_id
,
nc
.
get
()
->
amf_ue_ngap_id
,
uc
))
{
...
...
@@ -4128,6 +4142,8 @@ bool amf_n1::get_network_slice_selection_from_conf_file(
const
oai
::
amf
::
model
::
SliceInfoForRegistration
&
slice_info
,
oai
::
amf
::
model
::
AuthorizedNetworkSliceInfo
&
authorized_network_slice_info
)
const
{
Logger
::
amf_n1
().
debug
(
"Get the Network Slice Selection Information from configuration file"
);
// TODO: Get Authorized Network Slice Info from local configuration file
return
true
;
...
...
@@ -4139,6 +4155,9 @@ bool amf_n1::get_target_amf(
const
oai
::
amf
::
model
::
AuthorizedNetworkSliceInfo
&
authorized_network_slice_info
)
{
// Get Target AMF from AuthorizedNetworkSliceInfo
Logger
::
amf_n1
().
debug
(
"Get the list of candidates AMFs from the AuthorizedNetworkSliceInfo and "
"select the appropriate one"
);
std
::
string
target_amf_set
=
{};
std
::
string
nrf_amf_set
=
{};
// The URI of NRF NFDiscovery Service to query
// the list of AMF candidates
...
...
@@ -4234,6 +4253,8 @@ bool amf_n1::get_target_amf(
bool
amf_n1
::
select_target_amf
(
const
std
::
shared_ptr
<
nas_context
>&
nc
,
std
::
string
&
target_amf
,
const
nlohmann
::
json
&
amf_candidate_list
)
{
Logger
::
amf_n1
().
debug
(
"Select the appropriate AMF from the list of candidates"
);
bool
result
=
false
;
// Process data to obtain the target AMF
if
(
amf_candidate_list
.
find
(
"nfInstances"
)
!=
amf_candidate_list
.
end
())
{
...
...
@@ -4262,6 +4283,9 @@ bool amf_n1::select_target_amf(
void
amf_n1
::
send_n1_message_notity
(
const
std
::
shared_ptr
<
nas_context
>&
nc
,
const
std
::
string
&
target_amf
)
const
{
Logger
::
amf_n1
().
debug
(
"Send a request to N11 to send N1 Message Notify to the target AMF"
);
std
::
shared_ptr
<
itti_n11_n1_message_notify
>
itti_msg
=
std
::
make_shared
<
itti_n11_n1_message_notify
>
(
TASK_AMF_N1
,
TASK_AMF_N11
);
...
...
src/ngap/ngapIEs/NgapIEsStruct.hpp
View file @
2ee0900c
...
...
@@ -48,6 +48,13 @@ namespace ngap {
typedef
struct
S_Nssai_s
{
std
::
string
sst
;
std
::
string
sd
;
S_Nssai_s
&
operator
=
(
const
S_Nssai_s
&
s
)
{
sst
=
s
.
sst
;
sd
=
s
.
sd
;
return
*
this
;
}
bool
operator
==
(
const
struct
S_Nssai_s
&
s
)
const
{
if
((
s
.
sst
==
this
->
sst
)
&&
(
s
.
sd
.
compare
(
this
->
sd
)
==
0
))
{
return
true
;
...
...
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