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
3a662d95
Commit
3a662d95
authored
3 years ago
by
Masayuki Harada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move memory for USIM information to UICC.
parent
ec7958ed
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
8 deletions
+16
-8
openair3/NAS/NR_UE/nr_nas_msg_sim.c
openair3/NAS/NR_UE/nr_nas_msg_sim.c
+0
-8
openair3/UICC/usim_interface.c
openair3/UICC/usim_interface.c
+15
-0
openair3/UICC/usim_interface.h
openair3/UICC/usim_interface.h
+1
-0
No files found.
openair3/NAS/NR_UE/nr_nas_msg_sim.c
View file @
3a662d95
...
...
@@ -56,14 +56,6 @@ uint8_t *registration_request_buf;
uint32_t
registration_request_len
;
extern
char
*
baseNetAddress
;
static
uicc_t
*
checkUicc
(
int
Mod_id
)
{
if
(
!
PHY_vars_UE_g
[
Mod_id
][
0
]
->
uicc
)
{
char
uiccName
[
64
];
sprintf
(
uiccName
,
"uicc%d"
,
Mod_id
);
PHY_vars_UE_g
[
Mod_id
][
0
]
->
uicc
=
(
void
*
)
init_uicc
(
uiccName
);
}
return
(
uicc_t
*
)
PHY_vars_UE_g
[
Mod_id
][
0
]
->
uicc
;
}
static
int
nas_protected_security_header_encode
(
char
*
buffer
,
...
...
This diff is collapsed.
Click to expand it.
openair3/UICC/usim_interface.c
View file @
3a662d95
...
...
@@ -24,6 +24,7 @@
#include <openair3/UICC/usim_interface.h>
#include <openair3/NAS/COMMON/milenage.h>
extern
uint16_t
NB_UE_INST
;
#define UICC_SECTION "uicc"
#define UICC_CONFIG_HELP_OPTIONS " list of comma separated options to interface a simulated (real UICC to be developped). Available options: \n"\
...
...
@@ -43,6 +44,8 @@
{"sqn", "USIM sqn\n", 0, strptr:&(uicc->sqnStr), defstrval:"000000", TYPE_STRING, 0 },\
};
static
uicc_t
**
uiccArray
=
NULL
;
const
char
*
hexTable
=
"0123456789abcdef"
;
static
inline
uint8_t
mkDigit
(
unsigned
char
in
)
{
for
(
int
i
=
0
;
i
<
16
;
i
++
)
...
...
@@ -91,3 +94,15 @@ void uicc_milenage_generate(uint8_t *autn, uicc_t *uicc) {
log_dump
(
SIM
,
autn
,
sizeof
(
autn
),
LOG_DUMP_CHAR
,
"milenage output autn:"
);
}
uicc_t
*
checkUicc
(
int
Mod_id
)
{
AssertFatal
(
Mod_id
<
NB_UE_INST
,
"Mod_id must be less than NB_UE_INST. Mod_id:%d NB_UE_INST:%d"
,
Mod_id
,
NB_UE_INST
);
if
(
uiccArray
==
NULL
){
uiccArray
=
(
uicc_t
**
)
calloc
(
1
,
sizeof
(
uicc_t
*
)
*
NB_UE_INST
);
}
if
(
!
uiccArray
[
Mod_id
])
{
char
uiccName
[
64
];
sprintf
(
uiccName
,
"uicc%d"
,
Mod_id
);
uiccArray
[
Mod_id
]
=
(
void
*
)
init_uicc
(
uiccName
);
}
return
(
uicc_t
*
)
uiccArray
[
Mod_id
];
}
This diff is collapsed.
Click to expand it.
openair3/UICC/usim_interface.h
View file @
3a662d95
...
...
@@ -68,4 +68,5 @@ typedef struct {
*/
uicc_t
*
init_uicc
(
char
*
sectionName
);
void
uicc_milenage_generate
(
uint8_t
*
autn
,
uicc_t
*
uicc
);
uicc_t
*
checkUicc
(
int
Mod_id
);
#endif
This diff is collapsed.
Click to expand it.
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