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
ZhouShuya
OpenXG-RAN
Commits
5b8501e5
Commit
5b8501e5
authored
Dec 03, 2020
by
cucengineer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed nas message decode
parent
e2589eed
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
5 deletions
+44
-5
openair3/NAS/COMMON/EMM/MSG/FGSRegistrationAccept.c
openair3/NAS/COMMON/EMM/MSG/FGSRegistrationAccept.c
+30
-0
openair3/NAS/COMMON/EMM/MSG/FGSRegistrationAccept.h
openair3/NAS/COMMON/EMM/MSG/FGSRegistrationAccept.h
+14
-4
openair3/NAS/COMMON/IES/FGSMobileIdentity.c
openair3/NAS/COMMON/IES/FGSMobileIdentity.c
+0
-1
No files found.
openair3/NAS/COMMON/EMM/MSG/FGSRegistrationAccept.c
View file @
5b8501e5
...
@@ -93,6 +93,27 @@ int decode_fgs_network_feature_support(FGSNetworkFeatureSupport *fgsnetworkfeatu
...
@@ -93,6 +93,27 @@ int decode_fgs_network_feature_support(FGSNetworkFeatureSupport *fgsnetworkfeatu
return
decoded
;
return
decoded
;
}
}
int
decode_fgs_gprs_timer3
(
GPRStimer3
*
gprstimer3
,
uint8_t
iei
,
uint8_t
*
buffer
,
uint32_t
len
)
{
int
decoded
=
0
;
uint8_t
ielen
=
0
;
if
(
iei
>
0
)
{
CHECK_IEI_DECODER
(
iei
,
*
buffer
);
gprstimer3
->
iei
=
*
(
buffer
+
decoded
);
decoded
++
;
}
gprstimer3
->
length
=
*
(
buffer
+
decoded
);
decoded
++
;
CHECK_LENGTH_DECODER
(
len
-
decoded
,
ielen
);
gprstimer3
->
unit
=
(
*
(
buffer
+
decoded
)
>>
5
)
&
0x3
;
gprstimer3
->
timervalue
=
*
(
buffer
+
decoded
)
&
0x1f
;
decoded
++
;
return
decoded
;
}
int
decode_fgs_registration_accept
(
fgs_registration_accept_msg
*
fgs_registration_acc
,
uint8_t
*
buffer
,
uint32_t
len
)
int
decode_fgs_registration_accept
(
fgs_registration_accept_msg
*
fgs_registration_acc
,
uint8_t
*
buffer
,
uint32_t
len
)
{
{
int
decoded
=
0
;
int
decoded
=
0
;
...
@@ -143,6 +164,15 @@ int decode_fgs_registration_accept(fgs_registration_accept_msg *fgs_registration
...
@@ -143,6 +164,15 @@ int decode_fgs_registration_accept(fgs_registration_accept_msg *fgs_registration
break
;
break
;
}
}
case
REGISTRATION_ACCEPT_5GS_GPRS_timer3_T3512_value
:
if
((
decode_result
=
decode_fgs_gprs_timer3
(
&
fgs_registration_acc
->
gprstimer3
,
REGISTRATION_ACCEPT_5GS_GPRS_timer3_T3512_value
,
buffer
+
decoded
,
len
-
decoded
))
<
0
)
{
//Return in case of error
return
decode_result
;
}
else
{
decoded
+=
decode_result
;
break
;
}
default:
default:
return
TLV_DECODE_UNEXPECTED_IEI
;
return
TLV_DECODE_UNEXPECTED_IEI
;
}
}
...
...
openair3/NAS/COMMON/EMM/MSG/FGSRegistrationAccept.h
View file @
5b8501e5
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#define REGISTRATION_ACCEPT_5GS_TRACKING_AREA_IDENTITY_LIST 0x54
#define REGISTRATION_ACCEPT_5GS_TRACKING_AREA_IDENTITY_LIST 0x54
#define REGISTRATION_ACCEPT_ALLOWED_NSSA 0x15
#define REGISTRATION_ACCEPT_ALLOWED_NSSA 0x15
#define REGISTRATION_ACCEPT_5GS_NETWORK_FEATURE_SUPPORT 0x21
#define REGISTRATION_ACCEPT_5GS_NETWORK_FEATURE_SUPPORT 0x21
#define REGISTRATION_ACCEPT_5GS_GPRS_timer3_T3512_value 0x5E
typedef
struct
FGSTrackingAreaIdentityList_tag
{
typedef
struct
FGSTrackingAreaIdentityList_tag
{
#define TRACKING_AREA_IDENTITY_LIST_ONE_PLMN_NON_CONSECUTIVE_TACS 0b00
#define TRACKING_AREA_IDENTITY_LIST_ONE_PLMN_NON_CONSECUTIVE_TACS 0b00
...
@@ -52,6 +53,13 @@ typedef struct FGSNetworkFeatureSupport_tag {
...
@@ -52,6 +53,13 @@ typedef struct FGSNetworkFeatureSupport_tag {
unsigned
int
EMCN3
:
1
;
unsigned
int
EMCN3
:
1
;
}
FGSNetworkFeatureSupport
;
}
FGSNetworkFeatureSupport
;
typedef
struct
GPRStimer3_tag
{
uint8_t
iei
;
uint8_t
length
;
unsigned
int
unit
:
3
;
unsigned
int
timervalue
:
5
;
}
GPRStimer3
;
typedef
struct
fgs_registration_accept_msg_tag
{
typedef
struct
fgs_registration_accept_msg_tag
{
/* Mandatory fields */
/* Mandatory fields */
ExtendedProtocolDiscriminator
protocoldiscriminator
;
ExtendedProtocolDiscriminator
protocoldiscriminator
;
...
@@ -63,11 +71,13 @@ typedef struct fgs_registration_accept_msg_tag {
...
@@ -63,11 +71,13 @@ typedef struct fgs_registration_accept_msg_tag {
FGSTrackingAreaIdentityList
tailist
;
FGSTrackingAreaIdentityList
tailist
;
NSSAI
nssai
;
NSSAI
nssai
;
FGSNetworkFeatureSupport
fgsnetworkfeaturesupport
;
FGSNetworkFeatureSupport
fgsnetworkfeaturesupport
;
GPRStimer3
gprstimer3
;
}
fgs_registration_accept_msg
;
}
fgs_registration_accept_msg
;
int
decode_fgs_tracking_area_identity_list
(
FGSTrackingAreaIdentityList
*
tailist
,
uint8_t
iei
,
uint8_t
*
buffer
,
uint32_t
len
);
int
decode_fgs_tracking_area_identity_list
(
FGSTrackingAreaIdentityList
*
tailist
,
uint8_t
iei
,
uint8_t
*
buffer
,
uint32_t
len
);
int
decode_fgs_allowed_nssa
(
NSSAI
*
nssai
,
uint8_t
iei
,
uint8_t
*
buffer
,
uint32_t
len
);
int
decode_fgs_allowed_nssa
(
NSSAI
*
nssai
,
uint8_t
iei
,
uint8_t
*
buffer
,
uint32_t
len
);
int
decode_fgs_network_feature_support
(
FGSNetworkFeatureSupport
*
fgsnetworkfeaturesupport
,
uint8_t
iei
,
uint8_t
*
buffer
,
uint32_t
len
);
int
decode_fgs_network_feature_support
(
FGSNetworkFeatureSupport
*
fgsnetworkfeaturesupport
,
uint8_t
iei
,
uint8_t
*
buffer
,
uint32_t
len
);
int
decode_fgs_registration_accept
(
fgs_registration_accept_msg
*
fgs_registration_acc
,
uint8_t
*
buffer
,
uint32_t
len
);
int
decode_fgs_registration_accept
(
fgs_registration_accept_msg
*
fgs_registration_acc
,
uint8_t
*
buffer
,
uint32_t
len
);
int
decode_fgs_gprs_timer3
(
GPRStimer3
*
gprstimer3
,
uint8_t
iei
,
uint8_t
*
buffer
,
uint32_t
len
);
#endif
/* FGS REGISTRATION ACCEPT_H_*/
#endif
/* FGS REGISTRATION ACCEPT_H_*/
\ No newline at end of file
openair3/NAS/COMMON/IES/FGSMobileIdentity.c
View file @
5b8501e5
...
@@ -55,7 +55,6 @@ int decode_5gs_mobile_identity(FGSMobileIdentity *fgsmobileidentity, uint8_t iei
...
@@ -55,7 +55,6 @@ int decode_5gs_mobile_identity(FGSMobileIdentity *fgsmobileidentity, uint8_t iei
}
}
IES_DECODE_U16
(
buffer
,
decoded
,
ielen
);
IES_DECODE_U16
(
buffer
,
decoded
,
ielen
);
decoded
+=
2
;
CHECK_LENGTH_DECODER
(
len
-
decoded
,
ielen
);
CHECK_LENGTH_DECODER
(
len
-
decoded
,
ielen
);
uint8_t
typeofidentity
=
*
(
buffer
+
decoded
)
&
0x7
;
uint8_t
typeofidentity
=
*
(
buffer
+
decoded
)
&
0x7
;
...
...
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