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
b4e76614
Commit
b4e76614
authored
Jan 12, 2023
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup for PLMN List
parent
af488084
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
19 deletions
+19
-19
src/nas/ies/PLMN_List.cpp
src/nas/ies/PLMN_List.cpp
+7
-7
src/nas/ies/PLMN_List.hpp
src/nas/ies/PLMN_List.hpp
+6
-6
src/nas/msgs/RegistrationAccept.cpp
src/nas/msgs/RegistrationAccept.cpp
+5
-5
src/nas/msgs/RegistrationAccept.hpp
src/nas/msgs/RegistrationAccept.hpp
+1
-1
No files found.
src/nas/ies/PLMN_List.cpp
View file @
b4e76614
...
...
@@ -29,22 +29,22 @@
using
namespace
nas
;
//------------------------------------------------------------------------------
P
LMN_List
::
PLMN_
List
(
uint8_t
iei
)
:
Type4NasIe
(
iei
)
{
P
lmnList
::
Plmn
List
(
uint8_t
iei
)
:
Type4NasIe
(
iei
)
{
SetLengthIndicator
(
0
);
SetIeName
(
kPlmnListIeName
);
}
//------------------------------------------------------------------------------
P
LMN_List
::
PLMN_
List
()
:
Type4NasIe
()
{
P
lmnList
::
Plmn
List
()
:
Type4NasIe
()
{
SetLengthIndicator
(
0
);
SetIeName
(
kPlmnListIeName
);
}
//------------------------------------------------------------------------------
P
LMN_List
::~
PLMN_
List
()
{}
P
lmnList
::~
Plmn
List
()
{}
//------------------------------------------------------------------------------
void
P
LMN_List
::
s
et
(
uint8_t
iei
,
const
std
::
vector
<
nas_plmn_t
>&
list
)
{
void
P
lmnList
::
S
et
(
uint8_t
iei
,
const
std
::
vector
<
nas_plmn_t
>&
list
)
{
plmn_list
=
list
;
int
length
=
0
;
if
(
list
.
size
()
>
0
)
...
...
@@ -58,12 +58,12 @@ void PLMN_List::set(uint8_t iei, const std::vector<nas_plmn_t>& list) {
}
//------------------------------------------------------------------------------
void
P
LMN_List
::
getPLMNList
(
std
::
vector
<
nas_plmn_t
>&
list
)
{
void
P
lmnList
::
GetPLMNList
(
std
::
vector
<
nas_plmn_t
>&
list
)
const
{
list
=
plmn_list
;
}
//------------------------------------------------------------------------------
int
P
LMN_
List
::
Encode
(
uint8_t
*
buf
,
int
len
)
{
int
P
lmn
List
::
Encode
(
uint8_t
*
buf
,
int
len
)
{
Logger
::
nas_mm
().
debug
(
"Encoding %s"
,
GetIeName
().
c_str
());
int
ie_len
=
GetIeLength
();
...
...
@@ -89,7 +89,7 @@ int PLMN_List::Encode(uint8_t* buf, int len) {
}
//------------------------------------------------------------------------------
int
P
LMN_
List
::
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_iei
)
{
int
P
lmn
List
::
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_iei
)
{
Logger
::
nas_mm
().
debug
(
"Decoding %s"
,
GetIeName
().
c_str
());
if
(
len
<
kPlmnListMinimumLength
)
{
...
...
src/nas/ies/PLMN_List.hpp
View file @
b4e76614
...
...
@@ -34,17 +34,17 @@ constexpr auto kPlmnListIeName = "PLMN List";
namespace
nas
{
class
P
LMN_
List
:
public
Type4NasIe
{
class
P
lmn
List
:
public
Type4NasIe
{
public:
P
LMN_
List
();
P
LMN_
List
(
uint8_t
iei
);
~
P
LMN_
List
();
P
lmn
List
();
P
lmn
List
(
uint8_t
iei
);
~
P
lmn
List
();
int
Encode
(
uint8_t
*
buf
,
int
len
);
int
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_option
);
void
s
et
(
uint8_t
iei
,
const
std
::
vector
<
nas_plmn_t
>&
list
);
void
getPLMNList
(
std
::
vector
<
nas_plmn_t
>&
list
)
;
void
S
et
(
uint8_t
iei
,
const
std
::
vector
<
nas_plmn_t
>&
list
);
void
GetPLMNList
(
std
::
vector
<
nas_plmn_t
>&
list
)
const
;
private:
std
::
vector
<
nas_plmn_t
>
plmn_list
;
...
...
src/nas/msgs/RegistrationAccept.cpp
View file @
b4e76614
...
...
@@ -131,9 +131,9 @@ void RegistrationAccept::Set5gSTmsi() {}
//------------------------------------------------------------------------------
void
RegistrationAccept
::
setEquivalent_PLMNs
(
const
std
::
vector
<
nas_plmn_t
>&
list
)
{
P
LMN_
List
ie_equivalent_plmns_tmp
=
{};
ie_equivalent_plmns_tmp
.
s
et
(
kEquivalentPlmns
,
list
);
ie_equivalent_plmns
=
std
::
optional
<
P
LMN_
List
>
(
ie_equivalent_plmns_tmp
);
P
lmn
List
ie_equivalent_plmns_tmp
=
{};
ie_equivalent_plmns_tmp
.
S
et
(
kEquivalentPlmns
,
list
);
ie_equivalent_plmns
=
std
::
optional
<
P
lmn
List
>
(
ie_equivalent_plmns_tmp
);
}
//------------------------------------------------------------------------------
...
...
@@ -843,10 +843,10 @@ int RegistrationAccept::Decode(uint8_t* buf, int len) {
}
break
;
case
0x4A
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI (0x4A)"
);
P
LMN_
List
ie_equivalent_plmns_tmp
=
{};
P
lmn
List
ie_equivalent_plmns_tmp
=
{};
decoded_size
+=
ie_equivalent_plmns_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
ie_equivalent_plmns
=
std
::
optional
<
P
LMN_
List
>
(
ie_equivalent_plmns_tmp
);
ie_equivalent_plmns
=
std
::
optional
<
P
lmn
List
>
(
ie_equivalent_plmns_tmp
);
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
...
...
src/nas/msgs/RegistrationAccept.hpp
View file @
b4e76614
...
...
@@ -149,7 +149,7 @@ class RegistrationAccept : public NasMmPlainHeader {
_5GS_Registration_Result
ie_5gs_registration_result
;
// Mandatory
std
::
optional
<
_5GSMobileIdentity
>
ie_5g_guti
;
// Optional
std
::
optional
<
P
LMN_List
>
ie_equivalent_plmns
;
// Optional
std
::
optional
<
P
lmnList
>
ie_equivalent_plmns
;
// Optional
_5GSTrackingAreaIdList
*
ie_tai_list
;
// Optional
NSSAI
*
ie_allowed_nssai
;
// Optional
Rejected_NSSAI
*
ie_rejected_nssai
;
// Optional
...
...
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