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
161a9f7c
Commit
161a9f7c
authored
Feb 07, 2022
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup for getting common PLMNs between AMF and gNB
parent
776c8949
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
25 deletions
+7
-25
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+6
-24
src/amf-app/amf_n2.hpp
src/amf-app/amf_n2.hpp
+1
-1
No files found.
src/amf-app/amf_n2.cpp
View file @
161a9f7c
...
@@ -377,10 +377,7 @@ void amf_n2::handle_itti_message(itti_ng_setup_request& itti_msg) {
...
@@ -377,10 +377,7 @@ void amf_n2::handle_itti_message(itti_ng_setup_request& itti_msg) {
// in gNB context, if verified; else response NG SETUP FAILURE with cause
// in gNB context, if verified; else response NG SETUP FAILURE with cause
// "Unknown PLMN"(9.3.1.2, ts38413)
// "Unknown PLMN"(9.3.1.2, ts38413)
// std::vector<SupportedItem_t> common_plmn_list = get_common_plmn(s_ta_list);
// std::vector<SupportedItem_t> common_plmn_list = get_common_plmn(s_ta_list);
get_common_plmn
(
s_ta_list
,
gc
->
s_ta_list
);
if
(
!
get_common_plmn
(
s_ta_list
,
gc
->
s_ta_list
))
{
if
(
gc
->
s_ta_list
.
size
()
==
0
)
{
// if (!verifyPlmn(s_ta_list)) {
// encode NG SETUP FAILURE MESSAGE and send back
// encode NG SETUP FAILURE MESSAGE and send back
void
*
buffer
=
calloc
(
1
,
BUFFER_SIZE_1024
);
void
*
buffer
=
calloc
(
1
,
BUFFER_SIZE_1024
);
NGSetupFailureMsg
ngSetupFailure
;
NGSetupFailureMsg
ngSetupFailure
;
...
@@ -394,24 +391,8 @@ void amf_n2::handle_itti_message(itti_ng_setup_request& itti_msg) {
...
@@ -394,24 +391,8 @@ void amf_n2::handle_itti_message(itti_ng_setup_request& itti_msg) {
Logger
::
amf_n2
().
error
(
Logger
::
amf_n2
().
error
(
"No common PLMN, encoding NG_SETUP_FAILURE with cause (Unknown PLMN)"
);
"No common PLMN, encoding NG_SETUP_FAILURE with cause (Unknown PLMN)"
);
return
;
return
;
}
else
{
}
else
{
// store only the common PLMN
// gc->s_ta_list = common_plmn_list;
/*
Logger::amf_n2().debug("Common PLMN");
for (auto ta : gc->s_ta_list) {
for (auto p : ta.b_plmn_list) {
std::string mcc;
std::string mnc;
Logger::amf_n2().debug(
"PLMN MCC %s, MNC %s", p.mcc.c_str(), p.mnc.c_str());
for (auto s : p.slice_list) {
Logger::amf_n2().debug(
"S-NSSAI (SST %s, SD %s)", s.sst.c_str(), s.sd.c_str());
}
}
}
*/
for
(
auto
i
:
gc
->
s_ta_list
)
{
for
(
auto
i
:
gc
->
s_ta_list
)
{
gnbItem
.
plmn_list
.
push_back
(
i
);
gnbItem
.
plmn_list
.
push_back
(
i
);
}
}
...
@@ -2123,10 +2104,10 @@ bool amf_n2::verifyPlmn(vector<SupportedItem_t> list) {
...
@@ -2123,10 +2104,10 @@ bool amf_n2::verifyPlmn(vector<SupportedItem_t> list) {
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
amf_n2
::
get_common_plmn
(
bool
amf_n2
::
get_common_plmn
(
std
::
vector
<
SupportedItem_t
>
list
,
std
::
vector
<
SupportedItem_t
>&
result
)
{
std
::
vector
<
SupportedItem_t
>
list
,
std
::
vector
<
SupportedItem_t
>&
result
)
{
std
::
vector
<
SupportedItem_t
>
plmn_list
=
{};
std
::
vector
<
SupportedItem_t
>
plmn_list
=
{};
bool
found_common_plmn
=
false
;
for
(
int
i
=
0
;
i
<
amf_cfg
.
plmn_list
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
amf_cfg
.
plmn_list
.
size
();
i
++
)
{
for
(
int
j
=
0
;
j
<
list
.
size
();
j
++
)
{
for
(
int
j
=
0
;
j
<
list
.
size
();
j
++
)
{
Logger
::
amf_n2
().
debug
(
Logger
::
amf_n2
().
debug
(
...
@@ -2156,6 +2137,7 @@ void amf_n2::get_common_plmn(
...
@@ -2156,6 +2137,7 @@ void amf_n2::get_common_plmn(
"Common S-NSSAI (SST %s, SD %s)"
,
s1
.
sst
.
c_str
(),
"Common S-NSSAI (SST %s, SD %s)"
,
s1
.
sst
.
c_str
(),
s1
.
sd
.
c_str
());
s1
.
sd
.
c_str
());
plmn_slice_support_item
.
slice_list
.
push_back
(
s1
);
plmn_slice_support_item
.
slice_list
.
push_back
(
s1
);
found_common_plmn
=
true
;
}
}
}
}
}
}
...
@@ -2166,5 +2148,5 @@ void amf_n2::get_common_plmn(
...
@@ -2166,5 +2148,5 @@ void amf_n2::get_common_plmn(
}
}
}
}
}
}
// return plmn_list
;
return
found_common_plmn
;
}
}
src/amf-app/amf_n2.hpp
View file @
161a9f7c
...
@@ -68,7 +68,7 @@ class amf_n2 : public ngap::ngap_app {
...
@@ -68,7 +68,7 @@ class amf_n2 : public ngap::ngap_app {
void
handle_itti_message
(
itti_paging
&
itti_msg
);
void
handle_itti_message
(
itti_paging
&
itti_msg
);
bool
verifyPlmn
(
std
::
vector
<
SupportedItem_t
>
list
);
bool
verifyPlmn
(
std
::
vector
<
SupportedItem_t
>
list
);
void
get_common_plmn
(
bool
get_common_plmn
(
std
::
vector
<
SupportedItem_t
>
list
,
std
::
vector
<
SupportedItem_t
>&
result
);
std
::
vector
<
SupportedItem_t
>
list
,
std
::
vector
<
SupportedItem_t
>&
result
);
std
::
shared_ptr
<
ue_ngap_context
>
ran_ue_id_2_ue_ngap_context
(
std
::
shared_ptr
<
ue_ngap_context
>
ran_ue_id_2_ue_ngap_context
(
...
...
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