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
529b142d
Commit
529b142d
authored
Dec 05, 2024
by
Guido Casati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor servingNetworkName
parent
d6e2bf16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
openair3/NAS/NR_UE/nr_nas_msg.c
openair3/NAS/NR_UE/nr_nas_msg.c
+15
-8
No files found.
openair3/NAS/NR_UE/nr_nas_msg.c
View file @
529b142d
...
...
@@ -91,19 +91,26 @@ static fgmm_msg_header_t set_mm_header(fgs_nas_msg_t type, Security_header_t sec
return
mm_header
;
}
static
void
servingNetworkName
(
uint8_t
*
msg
,
char
*
imsiStr
,
int
nm
c_size
)
static
void
servingNetworkName
(
uint8_t
*
msg
,
char
*
imsiStr
,
int
mn
c_size
)
{
// SNN-network-identifier in TS 24.501
// TS 24.501: If the MNC of the serving PLMN has two digits, then a zero is added at the beginning.
const
char
*
format
=
"5G:mnc000.mcc000.3gppnetwork.org"
;
memcpy
(
msg
,
format
,
strlen
(
format
));
if
(
nmc_size
==
2
)
memcpy
(
msg
+
7
,
imsiStr
+
3
,
2
);
else
memcpy
(
msg
+
6
,
imsiStr
+
3
,
3
);
// MNC
char
mnc
[
4
];
if
(
mnc_size
==
2
)
{
snprintf
(
mnc
,
sizeof
(
mnc
),
"0%c%c"
,
imsiStr
[
3
],
imsiStr
[
4
]);
}
else
{
snprintf
(
mnc
,
sizeof
(
mnc
),
"%c%c%c"
,
imsiStr
[
3
],
imsiStr
[
4
],
imsiStr
[
5
]);
}
// MCC
char
mcc
[
4
];
snprintf
(
mcc
,
sizeof
(
mcc
),
"%c%c%c"
,
imsiStr
[
0
],
imsiStr
[
1
],
imsiStr
[
2
]);
int
size
=
64
;
memcpy
(
msg
+
13
,
imsiStr
,
3
);
snprintf
((
char
*
)
msg
,
size
,
"5G:mnc%3s.mcc%3s.3gppnetwork.org"
,
mnc
,
mcc
);
}
static
security_state_t
nas_security_rx_process
(
nr_ue_nas_t
*
nas
,
uint8_t
*
pdu_buffer
,
int
pdu_length
)
...
...
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