Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
lizhongxiao
OpenXG-RAN
Commits
128bd3d3
Commit
128bd3d3
authored
Nov 01, 2023
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create macro to ntoh_int16 buffer input
parent
21b269fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
openair3/NAS/NR_UE/nr_nas_msg_sim.c
openair3/NAS/NR_UE/nr_nas_msg_sim.c
+1
-9
openair3/UTILS/conversions.h
openair3/UTILS/conversions.h
+3
-0
No files found.
openair3/NAS/NR_UE/nr_nas_msg_sim.c
View file @
128bd3d3
...
@@ -968,14 +968,6 @@ static void parse_allowed_nssai(nr_nas_msg_snssai_t nssaiList[8], const uint8_t
...
@@ -968,14 +968,6 @@ static void parse_allowed_nssai(nr_nas_msg_snssai_t nssaiList[8], const uint8_t
}
}
}
}
static
inline
uint16_t
ntohs_unaligned
(
const
uint8_t
*
v
)
{
// sanitize may complain on unaligned access, even if it works on Intel/AMD
uint16_t
tmp
;
memcpy
(
&
tmp
,
v
,
sizeof
(
tmp
));
return
ntohs
(
tmp
);
}
/* Extract Allowed NSSAI from Regestration Accept according to
/* Extract Allowed NSSAI from Regestration Accept according to
3GPP TS 24.501 Table 8.2.7.1.1
3GPP TS 24.501 Table 8.2.7.1.1
*/
*/
...
@@ -995,7 +987,7 @@ static void get_allowed_nssai(nr_nas_msg_snssai_t nssai[8], const uint8_t *pdu_b
...
@@ -995,7 +987,7 @@ static void get_allowed_nssai(nr_nas_msg_snssai_t nssai[8], const uint8_t *pdu_b
const
int
type
=
*
pdu_buffer
++
;
const
int
type
=
*
pdu_buffer
++
;
switch
(
type
)
{
switch
(
type
)
{
case
0x77
:
// 5GS mobile identity
case
0x77
:
// 5GS mobile identity
pdu_buffer
+=
ntoh
s_unaligned
(
pdu_buffer
)
+
sizeof
(
uint16_t
);
pdu_buffer
+=
ntoh
_int16_buf
(
pdu_buffer
)
+
sizeof
(
uint16_t
);
break
;
break
;
case
0x4A
:
// PLMN list
case
0x4A
:
// PLMN list
...
...
openair3/UTILS/conversions.h
View file @
128bd3d3
...
@@ -44,6 +44,9 @@
...
@@ -44,6 +44,9 @@
#define ntoh_int24_buf(bUF) \
#define ntoh_int24_buf(bUF) \
((*bUF << 16) | ((*(bUF + 1)) << 8) | (*(bUF + 2)))
((*bUF << 16) | ((*(bUF + 1)) << 8) | (*(bUF + 2)))
#define ntoh_int16_buf(bUF) \
((*(bUF) << 8) | (*(bUF + 1)))
#define IN_ADDR_TO_BUFFER(X,bUFF) INT32_TO_BUFFER((X).s_addr,(char*)bUFF)
#define IN_ADDR_TO_BUFFER(X,bUFF) INT32_TO_BUFFER((X).s_addr,(char*)bUFF)
#define IN6_ADDR_TO_BUFFER(X,bUFF) \
#define IN6_ADDR_TO_BUFFER(X,bUFF) \
...
...
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