Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
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-AMF
Commits
d1cf1a2b
Commit
d1cf1a2b
authored
Jan 16, 2023
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue for unknown IEI
parent
62ee8399
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
118 additions
and
56 deletions
+118
-56
src/nas/common/Ie_Const.hpp
src/nas/common/Ie_Const.hpp
+0
-2
src/nas/common/NasIeHeader.hpp
src/nas/common/NasIeHeader.hpp
+5
-5
src/nas/msgs/AuthenticationFailure.cpp
src/nas/msgs/AuthenticationFailure.cpp
+5
-0
src/nas/msgs/AuthenticationReject.cpp
src/nas/msgs/AuthenticationReject.cpp
+5
-0
src/nas/msgs/AuthenticationReject.hpp
src/nas/msgs/AuthenticationReject.hpp
+1
-0
src/nas/msgs/AuthenticationRequest.cpp
src/nas/msgs/AuthenticationRequest.cpp
+2
-0
src/nas/msgs/AuthenticationResponse.cpp
src/nas/msgs/AuthenticationResponse.cpp
+6
-0
src/nas/msgs/AuthenticationResult.cpp
src/nas/msgs/AuthenticationResult.cpp
+5
-0
src/nas/msgs/ConfigurationUpdateCommand.cpp
src/nas/msgs/ConfigurationUpdateCommand.cpp
+7
-0
src/nas/msgs/DLNASTransport.cpp
src/nas/msgs/DLNASTransport.cpp
+9
-0
src/nas/msgs/RegistrationAccept.cpp
src/nas/msgs/RegistrationAccept.cpp
+31
-0
src/nas/msgs/RegistrationComplete.cpp
src/nas/msgs/RegistrationComplete.cpp
+1
-0
src/nas/msgs/RegistrationReject.cpp
src/nas/msgs/RegistrationReject.cpp
+8
-0
src/nas/msgs/RegistrationRequest.cpp
src/nas/msgs/RegistrationRequest.cpp
+2
-1
src/nas/msgs/SecurityModeCommand.cpp
src/nas/msgs/SecurityModeCommand.cpp
+6
-0
src/nas/msgs/SecurityModeComplete.cpp
src/nas/msgs/SecurityModeComplete.cpp
+5
-2
src/nas/msgs/SecurityModeReject.cpp
src/nas/msgs/SecurityModeReject.cpp
+0
-7
src/nas/msgs/ServiceAccept.cpp
src/nas/msgs/ServiceAccept.cpp
+6
-8
src/nas/msgs/ServiceRequest.cpp
src/nas/msgs/ServiceRequest.cpp
+4
-0
src/nas/msgs/ULNASTransport.cpp
src/nas/msgs/ULNASTransport.cpp
+10
-7
src/nas/utils/TLVDecoder.c
src/nas/utils/TLVDecoder.c
+0
-6
src/nas/utils/TLVDecoder.h
src/nas/utils/TLVDecoder.h
+0
-6
src/nas/utils/TLVEncoder.c
src/nas/utils/TLVEncoder.c
+0
-6
src/nas/utils/TLVEncoder.h
src/nas/utils/TLVEncoder.h
+0
-6
No files found.
src/nas/common/Ie_Const.hpp
View file @
d1cf1a2b
...
...
@@ -146,8 +146,6 @@ constexpr uint8_t kIeiSorTransparentContainer = 0x73;
constexpr
uint8_t
kIeiLadnIndication
=
0x74
;
constexpr
uint8_t
kIeiLadnInformation
=
0x79
;
constexpr
uint8_t
kIei5gGuti
=
0x77
;
// constexpr uint8_t kIeiImeisv = 0x77;
// constexpr uint8_t kIeiNonImeisvPei = 0x78;
constexpr
uint8_t
kIeiEapMessage
=
0x78
;
constexpr
uint8_t
kIeiPayloadContainer
=
0x7b
;
src/nas/common/NasIeHeader.hpp
View file @
d1cf1a2b
...
...
@@ -19,11 +19,11 @@
* contact@openairinterface.org
*/
#include "
../ies/
5GSMobileIdentity.hpp"
#include "
../ies/
MICOIndication.hpp"
#include "
../ies/
NetworkSlicingIndication.hpp"
#include "
../ies/
PDUSessionStatus.hpp"
#include "
../ies/
UEStatus.hpp"
#include "5GSMobileIdentity.hpp"
#include "MICOIndication.hpp"
#include "NetworkSlicingIndication.hpp"
#include "PDUSessionStatus.hpp"
#include "UEStatus.hpp"
#include "NasMmPlainHeader.hpp"
#include "5GMMCapability.hpp"
#include "5GSRegistrationType.hpp"
...
...
src/nas/msgs/AuthenticationFailure.cpp
View file @
d1cf1a2b
...
...
@@ -171,6 +171,11 @@ int AuthenticationFailure::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
default:
{
Logger
::
nas_mm
().
warn
(
"Unknown IEI 0x%x, stop decoding..."
,
octet
);
// Stop decoding
octet
=
0x00
;
}
break
;
}
}
Logger
::
nas_mm
().
debug
(
...
...
src/nas/msgs/AuthenticationReject.cpp
View file @
d1cf1a2b
...
...
@@ -106,6 +106,11 @@ int AuthenticationReject::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
default:
{
Logger
::
nas_mm
().
warn
(
"Unknown IEI 0x%x, stop decoding..."
,
octet
);
// Stop decoding
octet
=
0x00
;
}
break
;
}
}
Logger
::
nas_mm
().
debug
(
...
...
src/nas/msgs/AuthenticationReject.hpp
View file @
d1cf1a2b
...
...
@@ -37,6 +37,7 @@ class AuthenticationReject : public NasMmPlainHeader {
int
Decode
(
uint8_t
*
buf
,
int
len
);
void
SetEapMessage
(
const
bstring
&
eap
);
// TODO: Get
public:
std
::
optional
<
EapMessage
>
ie_eap_message
;
...
...
src/nas/msgs/AuthenticationRequest.cpp
View file @
d1cf1a2b
...
...
@@ -197,6 +197,7 @@ int AuthenticationRequest::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
kIeiAuthenticationParameterAutn
:
{
Authentication_Parameter_AUTN
ie_authentication_parameter_autn_tmp
=
{};
if
((
decoded_result
=
ie_authentication_parameter_autn_tmp
.
Decode
(
...
...
@@ -210,6 +211,7 @@ int AuthenticationRequest::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
kIeiEapMessage
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiEapMessage
);
EapMessage
ie_eap_message_tmp
=
{};
...
...
src/nas/msgs/AuthenticationResponse.cpp
View file @
d1cf1a2b
...
...
@@ -148,6 +148,7 @@ int AuthenticationResponse::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiEapMessage
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiEapMessage
);
EapMessage
ie_eap_message_tmp
=
{};
...
...
@@ -157,6 +158,11 @@ int AuthenticationResponse::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
default:
{
Logger
::
nas_mm
().
warn
(
"Unknown IEI 0x%x, stop decoding..."
,
octet
);
// Stop decoding
octet
=
0x00
;
}
break
;
}
}
Logger
::
nas_mm
().
debug
(
...
...
src/nas/msgs/AuthenticationResult.cpp
View file @
d1cf1a2b
...
...
@@ -152,6 +152,11 @@ int AuthenticationResult::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
default:
{
Logger
::
nas_mm
().
warn
(
"Unknown IEI 0x%x, stop decoding..."
,
octet
);
// Stop decoding
octet
=
0x00
;
}
break
;
}
}
Logger
::
nas_mm
().
debug
(
...
...
src/nas/msgs/ConfigurationUpdateCommand.cpp
View file @
d1cf1a2b
...
...
@@ -167,6 +167,7 @@ int ConfigurationUpdateCommand::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiShortNameForNetwork
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x45: Short Name for Network"
);
NetworkName
short_name_for_network_tmp
=
{};
...
...
@@ -180,6 +181,12 @@ int ConfigurationUpdateCommand::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
default:
{
Logger
::
nas_mm
().
warn
(
"Unknown IEI 0x%x, stop decoding..."
,
octet
);
// Stop decoding
octet
=
0x00
;
}
break
;
}
}
...
...
src/nas/msgs/DLNASTransport.cpp
View file @
d1cf1a2b
...
...
@@ -223,6 +223,7 @@ int DLNASTransport::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiAdditionalInformation
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI (0x24)"
);
AdditionalInformation
ie_additional_information_tmp
=
{};
...
...
@@ -236,6 +237,7 @@ int DLNASTransport::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIei5gmmCause
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI (0x58)"
);
_5gmmCause
ie_5gmm_cause_tmp
=
{};
...
...
@@ -248,6 +250,7 @@ int DLNASTransport::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiGprsTimer3BackOffTimer
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI (0x37)"
);
GprsTimer3
ie_back_off_timer_value_tmp
(
kIeiGprsTimer3BackOffTimer
);
...
...
@@ -261,6 +264,12 @@ int DLNASTransport::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
default:
{
Logger
::
nas_mm
().
warn
(
"Unknown IEI 0x%x, stop decoding..."
,
octet
);
// Stop decoding
octet
=
0x00
;
}
break
;
}
}
Logger
::
nas_mm
().
debug
(
...
...
src/nas/msgs/RegistrationAccept.cpp
View file @
d1cf1a2b
...
...
@@ -321,6 +321,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_tai_list
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_tai_list is not available"
);
}
else
{
...
...
@@ -333,6 +334,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_equivalent_plmns
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_equivalent_plmns is not available"
);
}
else
{
...
...
@@ -344,6 +346,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_allowed_nssai
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_allowed_nssai is not available"
);
}
else
{
...
...
@@ -355,6 +358,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_rejected_nssai
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_rejected_nssai is not available"
);
}
else
{
...
...
@@ -365,6 +369,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
Logger
::
nas_mm
().
error
(
"Encoding ie_rejected_nssai error"
);
}
}
if
(
!
ie_configured_nssai
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_configured_nssai is not available"
);
}
else
{
...
...
@@ -376,6 +381,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_5gs_network_feature_support
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_5gs_network_feature_support is not available"
);
}
else
{
...
...
@@ -387,6 +393,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_PDU_session_status
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_PDU_session_status is not available"
);
}
else
{
...
...
@@ -398,6 +405,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_pdu_session_reactivation_result
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_pdu_session_reactivation_result is not available"
);
...
...
@@ -411,6 +419,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_pdu_session_reactivation_result_error_cause
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_pdu_session_reactivation_result_error_cause is not available"
);
...
...
@@ -437,6 +446,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return 0;
}
}*/
if
(
!
ie_MICO_indication
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_MICO_indication is not available"
);
}
else
{
...
...
@@ -448,6 +458,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_network_slicing_indication
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_network_slicing_indication is not available"
);
}
else
{
...
...
@@ -459,6 +470,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_T3512_value
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_T3512_value is not available"
);
}
else
{
...
...
@@ -470,6 +482,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_Non_3GPP_de_registration_timer_value
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_Non_3GPP_de_registration_timer_value is not available"
);
...
...
@@ -483,6 +496,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_T3502_value
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_T3502_value is not available"
);
}
else
{
...
...
@@ -494,6 +508,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_sor_transparent_container
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_sor_transparent_container is not available"
);
}
else
{
...
...
@@ -505,6 +520,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_eap_message
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_eap_message is not available"
);
}
else
{
...
...
@@ -516,6 +532,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_nssai_inclusion_mode
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_nssai_inclusion_mode is not available"
);
}
else
{
...
...
@@ -527,6 +544,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_negotiated_drx_parameters
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_negotiated_drx_parameters is not available"
);
}
else
{
...
...
@@ -538,6 +556,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_non_3gpp_nw_policies
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_non_3gpp_nw_policies is not available"
);
}
else
{
...
...
@@ -549,6 +568,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_eps_bearer_context_status
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_eps_bearer_context_status is not available"
);
}
else
{
...
...
@@ -560,6 +580,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_extended_drx_parameters
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_extended_drx_parameters is not available"
);
}
else
{
...
...
@@ -571,6 +592,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_T3447_value
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_T3447_value is not available"
);
}
else
{
...
...
@@ -582,6 +604,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_T3448_value
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_T3448_value is not available"
);
}
else
{
...
...
@@ -593,6 +616,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_T3324_value
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_T3324_value is not available"
);
}
else
{
...
...
@@ -604,6 +628,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_ue_radio_capability_id
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_ue_radio_capability_id is not available"
);
}
else
{
...
...
@@ -615,6 +640,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
if
(
!
ie_pending_nssai
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_pending_nssai is not available"
);
}
else
{
...
...
@@ -626,6 +652,7 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
0
;
}
}
Logger
::
nas_mm
().
debug
(
"Encoded RegistrationAccept message len (%d)"
,
encoded_size
);
return
encoded_size
;
...
...
@@ -653,6 +680,7 @@ int RegistrationAccept::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiNetworkSlicingIndication
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x9"
,
kIeiNetworkSlicingIndication
);
...
...
@@ -664,6 +692,7 @@ int RegistrationAccept::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
0xA
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI (0xA)"
);
NssaiInclusionMode
ie_nssai_inclusion_mode_tmp
=
{};
...
...
@@ -674,6 +703,7 @@ int RegistrationAccept::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
0xD
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI (0xD)"
);
Non_3GPP_NW_Provided_Policies
ie_non_3gpp_nw_policies_tmp
=
{};
...
...
@@ -685,6 +715,7 @@ int RegistrationAccept::Decode(uint8_t* buf, int len) {
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
}
switch
(
octet
)
{
case
0x77
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI (0x77)"
);
...
...
src/nas/msgs/RegistrationComplete.cpp
View file @
d1cf1a2b
...
...
@@ -101,6 +101,7 @@ int RegistrationComplete::Decode(
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
default:
{
Logger
::
nas_mm
().
warn
(
"Unknown IEI 0x%x, stop decoding..."
,
octet
);
// Stop decoding
...
...
src/nas/msgs/RegistrationReject.cpp
View file @
d1cf1a2b
...
...
@@ -171,6 +171,7 @@ int RegistrationReject::Decode(
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kT3502Value
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x16: T3502 Value"
);
GprsTimer2
ie_T3502_value_tmp
(
kT3502Value
);
...
...
@@ -180,6 +181,7 @@ int RegistrationReject::Decode(
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiEapMessage
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x78: EAP Message"
);
EapMessage
ie_eap_message_tmp
=
{};
...
...
@@ -189,6 +191,7 @@ int RegistrationReject::Decode(
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiRejectedNssaiRr
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x69: Rejected NSSAI"
);
Rejected_NSSAI
ie_rejected_nssai_tmp
=
{};
...
...
@@ -199,6 +202,11 @@ int RegistrationReject::Decode(
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
default:
{
Logger
::
nas_mm
().
warn
(
"Unknown IEI 0x%x, stop decoding..."
,
octet
);
// Stop decoding
octet
=
0x00
;
}
break
;
}
}
Logger
::
nas_mm
().
debug
(
...
...
src/nas/msgs/RegistrationRequest.cpp
View file @
d1cf1a2b
...
...
@@ -895,9 +895,9 @@ int RegistrationRequest::Decode(uint8_t* buf, int len) {
ie_network_slicing_indication_tmp
);
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
}
switch
(
octet
)
{
case
kIei5gmmCapability
:
{
Logger
::
nas_mm
().
debug
(
"Decoding 5GMMCapability (IEI 0x10)"
);
...
...
@@ -1091,6 +1091,7 @@ int RegistrationRequest::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
// TODO: Default
}
}
Logger
::
nas_mm
().
debug
(
...
...
src/nas/msgs/SecurityModeCommand.cpp
View file @
d1cf1a2b
...
...
@@ -279,6 +279,7 @@ int SecurityModeCommand::Decode(uint8_t* buf, int len) {
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
}
switch
(
octet
)
{
case
kIeiEpsNasSecurityAlgorithms
:
{
Logger
::
nas_mm
().
debug
(
...
...
@@ -295,6 +296,7 @@ int SecurityModeCommand::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiAdditional5gSecurityInformation
:
{
Logger
::
nas_mm
().
debug
(
"decoding IEI 0x%x"
,
kIeiAdditional5gSecurityInformation
);
...
...
@@ -311,6 +313,7 @@ int SecurityModeCommand::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiEapMessage
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiEapMessage
);
EapMessage
ie_eap_message_tmp
=
{};
...
...
@@ -323,6 +326,7 @@ int SecurityModeCommand::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiAbba
:
{
Logger
::
nas_mm
().
debug
(
"decoding IEI (0x38)"
);
ABBA
ie_abba_tmp
=
{};
...
...
@@ -335,6 +339,7 @@ int SecurityModeCommand::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
0x19
:
{
Logger
::
nas_mm
().
debug
(
"decoding IEI (0x19)"
);
S1UeSecurityCapability
ie_s1_ue_security_capability_tmp
=
{};
...
...
@@ -348,6 +353,7 @@ int SecurityModeCommand::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
// TODO: Default
}
}
Logger
::
nas_mm
().
debug
(
...
...
src/nas/msgs/SecurityModeComplete.cpp
View file @
d1cf1a2b
...
...
@@ -182,6 +182,7 @@ int SecurityModeComplete::Decode(uint8_t* buf, int len) {
decoded_size
+=
decoded_result
;
ie_imeisv
=
std
::
optional
<
_5GSMobileIdentity
>
(
ie_imeisv_tmp
);
}
break
;
case
kIeiNasMessageContainer
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI (0x71)"
);
NasMessageContainer
ie_nas_message_container_tmp
=
{};
...
...
@@ -193,6 +194,7 @@ int SecurityModeComplete::Decode(uint8_t* buf, int len) {
ie_nas_message_container
=
std
::
optional
<
NasMessageContainer
>
(
ie_nas_message_container_tmp
);
}
break
;
case
kIei5gsMobileIdentityNonImeiSvPei
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI (0x78)"
);
_5GSMobileIdentity
ie_non_imeisvpei_tmp
=
{};
...
...
@@ -204,9 +206,10 @@ int SecurityModeComplete::Decode(uint8_t* buf, int len) {
ie_non_imeisvpei
=
std
::
optional
<
_5GSMobileIdentity
>
(
ie_non_imeisvpei_tmp
);
}
break
;
default:
{
Logger
::
nas_mm
().
debug
(
"Unexpected IEI (0x%x)"
,
octet
);
return
TLV_UNEXPECTED_IEI
;
Logger
::
nas_mm
().
warn
(
"Unexpected IEI (0x%x)"
,
octet
);
return
decoded_size
;
}
}
}
...
...
src/nas/msgs/SecurityModeReject.cpp
View file @
d1cf1a2b
...
...
@@ -19,13 +19,6 @@
* contact@openairinterface.org
*/
/*! \file
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "SecurityModeReject.hpp"
#include "3gpp_24.501.hpp"
...
...
src/nas/msgs/ServiceAccept.cpp
View file @
d1cf1a2b
...
...
@@ -19,13 +19,6 @@
* contact@openairinterface.org
*/
/*! \file
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "ServiceAccept.hpp"
#include "3gpp_24.501.hpp"
...
...
@@ -187,7 +180,7 @@ int ServiceAccept::Decode(uint8_t* buf, int len) {
Logger
::
nas_mm
().
debug
(
"First option IEI (0x%x)"
,
octet
);
while
((
octet
!=
0x0
))
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
octet
);
switch
(
(
octet
&
0xf0
)
>>
4
)
{
switch
(
octet
)
{
case
kIeiPduSessionStatus
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiPduSessionStatus
);
PDUSessionStatus
ie_PDU_session_status_tmp
=
{};
...
...
@@ -201,6 +194,7 @@ int ServiceAccept::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiPduSessionReactivationResult
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiPduSessionReactivationResult
);
...
...
@@ -217,6 +211,7 @@ int ServiceAccept::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiPduSessionReactivationResultErrorCause
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI (0x72)"
);
PDU_Session_Reactivation_Result_Error_Cause
...
...
@@ -233,6 +228,7 @@ int ServiceAccept::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiEapMessage
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI (0x78)"
);
EapMessage
ie_eap_message_tmp
=
{};
...
...
@@ -245,6 +241,7 @@ int ServiceAccept::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiGprsTimer3T3348
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiGprsTimer3T3348
);
GprsTimer3
ie_T3448_value_tmp
(
kIeiGprsTimer3T3348
);
...
...
@@ -257,6 +254,7 @@ int ServiceAccept::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
default:
{
Logger
::
nas_mm
().
warn
(
"Unknown IEI 0x%x, stop decoding..."
,
octet
);
// Stop decoding
...
...
src/nas/msgs/ServiceRequest.cpp
View file @
d1cf1a2b
...
...
@@ -231,6 +231,7 @@ int ServiceRequest::Decode(NasMmPlainHeader* header, uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiPduSessionStatus
:
{
Logger
::
nas_mm
().
debug
(
"Decoding ie_PDU_session_status (IEI 0x%x)"
,
kIeiPduSessionStatus
);
...
...
@@ -245,6 +246,7 @@ int ServiceRequest::Decode(NasMmPlainHeader* header, uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiAllowedPduSessionStatus
:
{
Logger
::
nas_mm
().
debug
(
"Decoding ie_allowed_PDU_session_status, IEI 0x%x"
,
...
...
@@ -260,6 +262,7 @@ int ServiceRequest::Decode(NasMmPlainHeader* header, uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiNasMessageContainer
:
{
Logger
::
nas_mm
().
debug
(
"Decoding ie_nas_message_container(IEI: 0x71)"
);
NasMessageContainer
ie_nas_message_container_tmp
=
{};
...
...
@@ -273,6 +276,7 @@ int ServiceRequest::Decode(NasMmPlainHeader* header, uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
default:
{
Logger
::
nas_mm
().
warn
(
"Unknown IEI 0x%x, stop decoding..."
,
octet
);
// Stop decoding
...
...
src/nas/msgs/ULNASTransport.cpp
View file @
d1cf1a2b
...
...
@@ -348,6 +348,7 @@ int ULNASTransport::Decode(uint8_t* buf, int len) {
uint8_t
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"First option IEI (0x%x)"
,
octet
);
bool
flag
=
false
;
while
((
octet
!=
0x0
))
{
switch
((
octet
&
0xf0
)
>>
4
)
{
case
kIeiRequestType
:
{
...
...
@@ -362,6 +363,7 @@ int ULNASTransport::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiMaPduSessionInformation
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI (0xA)"
);
MaPduSessionInformation
ie_ma_pdu_session_information_tmp
=
{};
...
...
@@ -375,6 +377,7 @@ int ULNASTransport::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiReleaseAssistanceIndication
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiReleaseAssistanceIndication
);
...
...
@@ -390,10 +393,12 @@ int ULNASTransport::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
default:
{
flag
=
true
;
}
}
switch
(
octet
)
{
case
kIeiPduSessionId
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiPduSessionId
);
...
...
@@ -408,6 +413,7 @@ int ULNASTransport::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiOldPduSessionId
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiOldPduSessionId
);
PduSessionIdentity2
ie_old_pdu_session_identity_2_tmp
=
{};
...
...
@@ -421,6 +427,7 @@ int ULNASTransport::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiSNssai
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI (0x22)"
);
auto
s_nssai_ie
=
std
::
optional
<
uint8_t
>
(
kIeiSNssai
);
...
...
@@ -434,6 +441,7 @@ int ULNASTransport::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiDnn
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI (0x25)"
);
DNN
ie_dnn_tmp
=
{};
...
...
@@ -447,6 +455,7 @@ int ULNASTransport::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiAdditionalInformation
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiAdditionalInformation
);
AdditionalInformation
ie_additional_information_tmp
=
{};
...
...
@@ -460,16 +469,10 @@ int ULNASTransport::Decode(uint8_t* buf, int len) {
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
default:
{
// TODO:
if
(
flag
)
{
// Logger::nas_mm().debug("Unknown IEI (0x%x)", octet);
// decoded_size++;
// return decoded_size;
//*(buf + decoded_size) = 0x00;
// octet = *(buf + decoded_size);
// Logger::nas_mm().debug("Next IEI (0x%x)", octet);
Logger
::
nas_mm
().
warn
(
"Unknown IEI 0x%x, stop decoding..."
,
octet
);
// Stop decoding
octet
=
0x00
;
...
...
src/nas/utils/TLVDecoder.c
View file @
d1cf1a2b
...
...
@@ -19,12 +19,6 @@
* contact@openairinterface.org
*/
/*! \file TLVDecoder.c
\brief
\author Philippe MOREL, Sebastien ROUX, Lionel GAUTHIER
\company Eurecom
*/
#include "TLVDecoder.h"
#include <stdint.h>
...
...
src/nas/utils/TLVDecoder.h
View file @
d1cf1a2b
...
...
@@ -19,12 +19,6 @@
* contact@openairinterface.org
*/
/*! \file TLVDecoder.h
\brief
\author Philippe MOREL, Sebastien ROUX, Lionel GAUTHIER
\company Eurecom
*/
#ifndef FILE_TLV_DECODER_SEEN
#define FILE_TLV_DECODER_SEEN
...
...
src/nas/utils/TLVEncoder.c
View file @
d1cf1a2b
...
...
@@ -19,12 +19,6 @@
* contact@openairinterface.org
*/
/*! \file TLVEncoder.c
\brief
\author Philippe MOREL, Sebastien ROUX, Lionel GAUTHIER
\company Eurecom
*/
#include "TLVEncoder.h"
#include <stdbool.h>
...
...
src/nas/utils/TLVEncoder.h
View file @
d1cf1a2b
...
...
@@ -19,12 +19,6 @@
* contact@openairinterface.org
*/
/*! \file TLVEncoder.h
\brief
\author Philippe MOREL, Sebastien ROUX, Lionel GAUTHIER
\company Eurecom
*/
#ifndef FILE_TLV_ENCODER_SEEN
#define FILE_TLV_ENCODER_SEEN
...
...
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