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
常顺宇
OpenXG-RAN
Commits
ffd4c20e
Commit
ffd4c20e
authored
Sep 24, 2020
by
laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix L2 tracing in wireshark, start security mode comman
parent
3024f578
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
145 additions
and
112 deletions
+145
-112
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
openair2/UTIL/OPT/mac_pcap.h
openair2/UTIL/OPT/mac_pcap.h
+1
-16
openair2/UTIL/OPT/opt.h
openair2/UTIL/OPT/opt.h
+1
-1
openair2/UTIL/OPT/probe.c
openair2/UTIL/OPT/probe.c
+105
-93
openair3/NAS/COMMON/NR_NAS_defs.h
openair3/NAS/COMMON/NR_NAS_defs.h
+21
-1
openair3/NAS/gNB/network_process_nas.c
openair3/NAS/gNB/network_process_nas.c
+16
-0
No files found.
cmake_targets/CMakeLists.txt
View file @
ffd4c20e
...
...
@@ -2640,7 +2640,7 @@ target_link_libraries (measurement_display minimal_lib)
add_executable
(
test5Gnas
${
OPENAIR_DIR
}
/openair3/TEST/test5Gnas.c
)
target_link_libraries
(
test5Gnas
LIB_5GNAS_GNB CONFIG_LIB minimal_lib
${
NETTLE_LIBRARIES
}
)
target_link_libraries
(
test5Gnas
${
NETTLE_LIBRARIES
}
LIB_5GNAS_GNB CONFIG_LIB minimal_lib
)
# lte-softmodem is both eNB and UE implementation
...
...
openair2/UTIL/OPT/mac_pcap.h
View file @
ffd4c20e
...
...
@@ -6,6 +6,7 @@
#include <arpa/inet.h>
#define MAC_LTE_DLT 147
#define DLT_IPV4 228
/********************************************************/
/* Definitions and descriptions come from:
http://wiki.wireshark.org/Development/LibpcapFileFormat */
...
...
@@ -29,20 +30,4 @@ typedef struct pcaprec_hdr_s {
unsigned
int
orig_len
;
/* actual length of packet */
}
pcaprec_hdr_t
;
/* Context information for every MAC PDU that will be logged */
typedef
struct
MAC_Context_Info_t
{
unsigned
short
radioType
;
unsigned
char
direction
;
unsigned
char
rntiType
;
unsigned
short
rnti
;
unsigned
short
ueid
;
unsigned
char
isRetx
;
unsigned
char
crcStatusOK
;
unsigned
short
sysFrameNumber
;
unsigned
short
subFrameNumber
;
unsigned
int
subframesSinceCaptureStart
;
}
MAC_Context_Info_t
;
#endif
openair2/UTIL/OPT/opt.h
View file @
ffd4c20e
...
...
@@ -73,7 +73,7 @@ typedef guint8 gboolean;
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*---------------------------------------------------------------------------------------------------------------------------------------------*/
#define OPT_PARAMS_DESC { \
{"type" , CONFIG_HLP_TYPEMON, 0, strptr:&in_type, defstrval:"none", TYPE_STRING, 0}, \
{"type" , CONFIG_HLP_TYPEMON, 0, strptr:
(char**)
&in_type, defstrval:"none", TYPE_STRING, 0}, \
{"ip" , CONFIG_HLP_L2MONIP, 0, strptr:(char**)&in_ip, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
{"path" , CONFIG_HLP_L2MONPATH, 0, strptr:(char**)&in_path,defstrval:"/tmp/oai_opt.pcap", TYPE_STRING, 0}, \
}
...
...
openair2/UTIL/OPT/probe.c
View file @
ffd4c20e
This diff is collapsed.
Click to expand it.
openair3/NAS/COMMON/NR_NAS_defs.h
View file @
ffd4c20e
...
...
@@ -310,7 +310,7 @@ typedef struct __attribute__((packed)) {
}
authenticationrequestHeader_t
;
typedef
struct
{
typedef
struct
__attribute__
((
packed
)
{
Extendedprotocoldiscriminator_t
epd
:
8
;
Security_header_t
sh
:
8
;
SGSmobilitymanagementmessages_t
mt
:
8
;
...
...
@@ -321,6 +321,26 @@ typedef struct {
//AUTHENTICATION RESULT
typedef
struct
__attribute__
((
packed
))
{
Extendedprotocoldiscriminator_t
epd
:
8
;
Security_header_t
sh
:
8
;
SGSmobilitymanagementmessages_t
mt
:
8
;
unsigned
int
selectedNASsecurityalgorithms
;
unsigned
int
ngKSI
:
4
;
//ngKSI NAS key set identifier 9.11.3.32
unsigned
int
spare
:
4
;
// LV 3-9 bytes Replayed UE security capabilities UE security capability 9.11.3.54
/* optional
TV (E-, 1 byte) Oprional IMEISV request IMEISV request 9.11.3.28
TV (57, 2 bytes ) Selected EPS NAS security algorithms EPS NAS security algorithms 9.11.3.25
TLV (36, 3 bytes) Additional 5G security information Additional 5G security information 9.11.3.12
TLV-E (78,, 7-1503 bytes) EAP message EAP message 9.11.2.2
TLV (38, 4-n)ABBA ABBA 9.11.3.10
TLV (19, 4-7) Replayed S1 UE security capabilities S1 UE security capability 9.11.3.48A
*/
}
securityModeCommand_t
;
typedef
struct
{
uicc_t
*
uicc
;
...
...
openair3/NAS/gNB/network_process_nas.c
View file @
ffd4c20e
...
...
@@ -59,6 +59,7 @@ void SGSauthenticationResp(void *msg, NRUEcontext_t *UE) {
}
void
SGSsecurityModeComplete
(
void
*
msg
,
NRUEcontext_t
*
UE
)
{
}
void
SGSregistrationComplete
(
void
*
msg
,
NRUEcontext_t
*
UE
)
{
...
...
@@ -171,5 +172,20 @@ int authenticationRequest(void **msg, NRUEcontext_t *UE) {
int
securityModeCommand
(
void
**
msg
,
NRUEcontext_t
*
UE
)
{
*
msg
=
NULL
;
myCalloc
(
req
,
securityModeCommand_t
);
req
->
epd
=
SGSmobilitymanagementmessages
;
req
->
sh
=
0
;
req
->
mt
=
Securitymodecommand
;
// integrity algo from 5G-IA0 (null algo) to 5G-IA7 in first 4 bits
unsigned
int
ia
=
0
;
// cyphering algo from 5G-EA0 (null algo) to 5G-IA7 in MSB 4 bits
unsigned
int
ea
=
0
;
// trace from commercial: 5G-IA0 (0) 128-5G-IA2 (2)
req
->
selectedNASsecurityalgorithms
=
ea
<<
4
|
ia
;
// KSI: N-NAS-int-alg 0x02
req
->
ngKSI
=
2
;
return
0
;
}
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