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
spbro
OpenXG-RAN
Commits
e35401ef
Commit
e35401ef
authored
Mar 13, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NAS refactor: no moduleID, group UICC and security in one context
parent
223fd28b
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
93 additions
and
93 deletions
+93
-93
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+2
-1
openair3/NAS/COMMON/NR_NAS_defs.h
openair3/NAS/COMMON/NR_NAS_defs.h
+1
-1
openair3/NAS/COMMON/nr_common.c
openair3/NAS/COMMON/nr_common.c
+1
-1
openair3/NAS/NR_UE/nr_nas_msg_sim.c
openair3/NAS/NR_UE/nr_nas_msg_sim.c
+79
-85
openair3/NAS/NR_UE/nr_nas_msg_sim.h
openair3/NAS/NR_UE/nr_nas_msg_sim.h
+8
-1
openair3/UICC/usim_interface.c
openair3/UICC/usim_interface.c
+1
-2
openair3/UICC/usim_interface.h
openair3/UICC/usim_interface.h
+1
-2
No files found.
openair2/RRC/NR_UE/rrc_UE.c
View file @
e35401ef
...
...
@@ -1372,7 +1372,8 @@ static void rrc_ue_generate_RRCSetupComplete(
if
(
get_softmodem_params
()
->
sa
)
{
as_nas_info_t
initialNasMsg
;
generateRegistrationRequest
(
&
initialNasMsg
,
ctxt_pP
->
module_id
);
nr_ue_nas_t
*
nas
=
get_ue_nas_info
(
ctxt_pP
->
module_id
);
generateRegistrationRequest
(
&
initialNasMsg
,
nas
);
nas_msg
=
(
char
*
)
initialNasMsg
.
data
;
nas_msg_length
=
initialNasMsg
.
length
;
}
else
{
...
...
openair3/NAS/COMMON/NR_NAS_defs.h
View file @
e35401ef
...
...
@@ -371,7 +371,7 @@ typedef struct {
#define STATIC_ASSERT(test_for_true) _Static_assert((test_for_true), "(" #test_for_true ") failed")
#define myCalloc(var, type) type * var=(type*)calloc(sizeof(type),1);
#define arrayCpy(tO, FroM) STATIC_ASSERT(sizeof(tO) == sizeof(FroM)) ; memcpy(tO, FroM, sizeof(tO))
int
resToresStar
(
uint8_t
*
msg
,
uicc_t
*
uicc
);
int
resToresStar
(
uint8_t
*
msg
,
const
uicc_t
*
uicc
);
int
identityResponse
(
void
**
msg
,
nr_user_nas_t
*
UE
);
int
authenticationResponse
(
void
**
msg
,
nr_user_nas_t
*
UE
);
...
...
openair3/NAS/COMMON/nr_common.c
View file @
e35401ef
...
...
@@ -39,7 +39,7 @@ void servingNetworkName(uint8_t *msg, char * imsiStr, int nmc_size) {
memcpy
(
msg
+
13
,
imsiStr
,
3
);
}
int
resToresStar
(
uint8_t
*
msg
,
uicc_t
*
uicc
)
{
int
resToresStar
(
uint8_t
*
msg
,
const
uicc_t
*
uicc
)
{
// TS 33.220 annex B.2 => FC=0x6B in TS 33.501 annex A.4
//input S to KDF
uint8_t
S
[
128
]
=
{
0
};
...
...
openair3/NAS/NR_UE/nr_nas_msg_sim.c
View file @
e35401ef
This diff is collapsed.
Click to expand it.
openair3/NAS/NR_UE/nr_nas_msg_sim.h
View file @
e35401ef
...
...
@@ -39,6 +39,7 @@
#include "RegistrationComplete.h"
#include "as_message.h"
#include "FGSUplinkNasTransport.h"
#include <openair3/UICC/usim_interface.h>
#define PLAIN_5GS_MSG 0b0000
#define INTEGRITY_PROTECTED 0b0001
...
...
@@ -80,6 +81,11 @@ typedef struct {
uint8_t
kgnb
[
32
];
}
ue_sa_security_key_t
;
typedef
struct
{
uicc_t
*
uicc
;
ue_sa_security_key_t
security
;
}
nr_ue_nas_t
;
typedef
enum
fgs_protocol_discriminator_e
{
/* Protocol discriminator identifier for 5GS Mobility Management */
FGS_MOBILITY_MANAGEMENT_MESSAGE
=
0x7E
,
...
...
@@ -158,7 +164,8 @@ typedef struct {
fgs_sm_nas_msg_header_t
sm_nas_msg_header
;
}
dl_nas_transport_t
;
void
generateRegistrationRequest
(
as_nas_info_t
*
initialNasMsg
,
int
Mod_id
);
nr_ue_nas_t
*
get_ue_nas_info
(
module_id_t
module_id
);
void
generateRegistrationRequest
(
as_nas_info_t
*
initialNasMsg
,
nr_ue_nas_t
*
nas
);
void
*
nas_nrue_task
(
void
*
args_p
);
#endif
/* __NR_NAS_MSG_SIM_H__*/
...
...
openair3/UICC/usim_interface.c
View file @
e35401ef
...
...
@@ -116,9 +116,8 @@ uicc_t * checkUicc(int Mod_id) {
return
(
uicc_t
*
)
uiccArray
[
Mod_id
];
}
uint8_t
getImeisvDigit
(
int
Mod_id
,
uint8_t
i
)
uint8_t
getImeisvDigit
(
const
uicc_t
*
uicc
,
uint8_t
i
)
{
uicc_t
*
uicc
=
checkUicc
(
Mod_id
);
uint8_t
r
=
0
;
uint8_t
l
=
strlen
(
uicc
->
imeisvStr
);
if
(
l
>
IMEISV_STR_MAX_LENGTH
)
{
...
...
openair3/UICC/usim_interface.h
View file @
e35401ef
...
...
@@ -73,6 +73,5 @@ typedef struct {
uicc_t
*
checkUicc
(
int
Mod_id
);
uicc_t
*
init_uicc
(
char
*
sectionName
);
void
uicc_milenage_generate
(
uint8_t
*
autn
,
uicc_t
*
uicc
);
uicc_t
*
checkUicc
(
int
Mod_id
);
uint8_t
getImeisvDigit
(
int
Mod_id
,
uint8_t
i
);
uint8_t
getImeisvDigit
(
const
uicc_t
*
uicc
,
uint8_t
i
);
#endif
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