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
d31dd333
Commit
d31dd333
authored
Feb 03, 2022
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue for decoding UENetworkCapability
parent
c79a16b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
10 deletions
+27
-10
src/nas/ies/UENetworkCapability.cpp
src/nas/ies/UENetworkCapability.cpp
+22
-10
src/nas/ies/UENetworkCapability.hpp
src/nas/ies/UENetworkCapability.hpp
+5
-0
No files found.
src/nas/ies/UENetworkCapability.cpp
View file @
d31dd333
...
...
@@ -59,7 +59,7 @@ UENetworkCapability::UENetworkCapability(
_iei
=
iei
;
_5g_EEASel
=
_5gg_EEASel
;
_5g_EIASel
=
_5gg_EIASel
;
length
=
4
;
length
=
4
;
// Minimum length
Logger
::
nas_mm
().
debug
(
"decoded UENetworkCapability EA(0x%d),IA(0x%d)"
,
_5g_EEASel
,
_5g_EIASel
);
}
...
...
@@ -86,9 +86,9 @@ uint8_t UENetworkCapability::getEIASel() {
//------------------------------------------------------------------------------
int
UENetworkCapability
::
encode2buffer
(
uint8_t
*
buf
,
int
len
)
{
Logger
::
nas_mm
().
debug
(
"encoding UENetworkCapability
iei
(0x%x)"
,
_iei
);
Logger
::
nas_mm
().
debug
(
"encoding UENetworkCapability
IEI
(0x%x)"
,
_iei
);
if
(
len
<
length
)
{
Logger
::
nas_mm
().
error
(
"
l
en is less than %d"
,
length
);
Logger
::
nas_mm
().
error
(
"
L
en is less than %d"
,
length
);
return
0
;
}
int
encoded_size
=
0
;
...
...
@@ -102,29 +102,41 @@ int UENetworkCapability::encode2buffer(uint8_t* buf, int len) {
*
(
buf
+
encoded_size
)
=
_5g_EIASel
;
encoded_size
++
;
}
else
{
//*(buf + encoded_size) = length - 1; encoded_size++;
//*(buf + encoded_size) = _value; encoded_size++; encoded_size++;
*
(
buf
+
encoded_size
)
=
length
-
1
;
encoded_size
++
;
*
(
buf
+
encoded_size
)
=
_5g_EEASel
;
encoded_size
++
;
*
(
buf
+
encoded_size
)
=
_5g_EIASel
;
encoded_size
++
;
}
Logger
::
nas_mm
().
debug
(
"
encoded UENetworkCapability len
(%d)"
,
encoded_size
);
Logger
::
nas_mm
().
debug
(
"
Encoded UENetworkCapability len
(%d)"
,
encoded_size
);
return
encoded_size
;
}
//------------------------------------------------------------------------------
int
UENetworkCapability
::
decodefrombuffer
(
uint8_t
*
buf
,
int
len
,
bool
is_option
)
{
Logger
::
nas_mm
().
debug
(
"
decoding UENetworkCapability iei(0x%x)"
,
*
buf
);
Logger
::
nas_mm
().
debug
(
"
Decoding UENetworkCapability IEI"
);
int
decoded_size
=
0
;
int
ie_length
=
0
;
if
(
is_option
)
{
_iei
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
}
length
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
ie_length
=
length
+
decoded_size
;
_5g_EEASel
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
_5g_EIASel
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
Logger
::
nas_mm
().
debug
(
"decoded UENetworkCapability EA(0x%d),IA(0x%d)"
,
_5g_EEASel
,
_5g_EIASel
);
Logger
::
nas_mm
().
debug
(
"decoded UENetworkCapability len(%d)"
,
decoded_size
);
return
decoded_size
;
"Decoded UENetworkCapability EA (0x%d), IA (0x%d)"
,
_5g_EEASel
,
_5g_EIASel
);
Logger
::
nas_mm
().
debug
(
"Decoded UENetworkCapability len 0x%d, actual length 0x%d"
,
decoded_size
,
ie_length
);
return
ie_length
;
}
src/nas/ies/UENetworkCapability.hpp
View file @
d31dd333
...
...
@@ -52,6 +52,11 @@ class UENetworkCapability {
uint8_t
length
;
uint8_t
_5g_EEASel
;
uint8_t
_5g_EIASel
;
uint8_t
uEASel
;
uint8_t
uIASel
;
uint8_t
octet_7
;
uint8_t
octet_8
;
uint8_t
octet_9
;
};
}
// namespace nas
...
...
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