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
1
Merge Requests
1
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-RAN
Commits
21b269fa
Commit
21b269fa
authored
Nov 01, 2023
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create macro to do ntoh for 3 bytes
use it in NSSAI parsing function
parent
dc95e838
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
openair3/NAS/NR_UE/nr_nas_msg_sim.c
openair3/NAS/NR_UE/nr_nas_msg_sim.c
+5
-4
openair3/UTILS/conversions.h
openair3/UTILS/conversions.h
+3
-0
No files found.
openair3/NAS/NR_UE/nr_nas_msg_sim.c
View file @
21b269fa
...
...
@@ -52,6 +52,7 @@
#include <openair1/SIMULATION/ETH_TRANSPORT/proto.h>
#include "openair2/SDAP/nr_sdap/nr_sdap.h"
#include "openair3/SECU/nas_stream_eia2.h"
#include "openair3/UTILS/conversions.h"
uint8_t
*
registration_request_buf
;
uint32_t
registration_request_len
;
...
...
@@ -937,14 +938,14 @@ static void parse_allowed_nssai(nr_nas_msg_snssai_t nssaiList[8], const uint8_t
case
4
:
nssai
->
sst
=
*
buf
++
;
nssai
->
sd
=
0xffffff
&
(
buf
[
2
]
|
buf
[
1
]
<<
8
|
buf
[
0
]
<<
16
);
nssai
->
sd
=
0xffffff
&
ntoh_int24_buf
(
buf
);
buf
+=
3
;
nssai_cnt
++
;
break
;
case
5
:
nssai
->
sst
=
*
buf
++
;
nssai
->
sd
=
0xffffff
&
(
buf
[
2
]
|
buf
[
1
]
<<
8
|
buf
[
0
]
<<
16
);
nssai
->
sd
=
0xffffff
&
ntoh_int24_buf
(
buf
);
buf
+=
3
;
nssai
->
hplmn_sst
=
*
buf
++
;
nssai_cnt
++
;
...
...
@@ -952,10 +953,10 @@ static void parse_allowed_nssai(nr_nas_msg_snssai_t nssaiList[8], const uint8_t
case
8
:
nssai
->
sst
=
*
buf
++
;
nssai
->
sd
=
0xffffff
&
(
buf
[
2
]
|
buf
[
1
]
<<
8
|
buf
[
0
]
<<
16
);
nssai
->
sd
=
0xffffff
&
ntoh_int24_buf
(
buf
);
buf
+=
3
;
nssai
->
hplmn_sst
=
*
buf
++
;
nssai
->
hplmn_sd
=
0xffffff
&
(
buf
[
2
]
|
buf
[
1
]
<<
8
|
buf
[
0
]
<<
16
);
nssai
->
hplmn_sd
=
0xffffff
&
ntoh_int24_buf
(
buf
);
buf
+=
3
;
nssai_cnt
++
;
break
;
...
...
openair3/UTILS/conversions.h
View file @
21b269fa
...
...
@@ -41,6 +41,9 @@
# define hton_int16(x) (x)
#endif
#define ntoh_int24_buf(bUF) \
((*bUF << 16) | ((*(bUF + 1)) << 8) | (*(bUF + 2)))
#define IN_ADDR_TO_BUFFER(X,bUFF) INT32_TO_BUFFER((X).s_addr,(char*)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