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
66bee1a7
Commit
66bee1a7
authored
Feb 08, 2023
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup for RegistrationRequest
parent
3cb14ce5
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
525 additions
and
389 deletions
+525
-389
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+18
-18
src/nas/ies/5GSRegistrationType.hpp
src/nas/ies/5GSRegistrationType.hpp
+2
-2
src/nas/ies/LADN_Indication.cpp
src/nas/ies/LADN_Indication.cpp
+1
-1
src/nas/ies/LADN_Indication.hpp
src/nas/ies/LADN_Indication.hpp
+1
-1
src/nas/ies/_5GSDeregistrationType.cpp
src/nas/ies/_5GSDeregistrationType.cpp
+2
-2
src/nas/ies/_5GSDeregistrationType.hpp
src/nas/ies/_5GSDeregistrationType.hpp
+3
-3
src/nas/ies/_5gsUpdateType.cpp
src/nas/ies/_5gsUpdateType.cpp
+4
-4
src/nas/ies/_5gsUpdateType.hpp
src/nas/ies/_5gsUpdateType.hpp
+4
-4
src/nas/msgs/RegistrationRequest.cpp
src/nas/msgs/RegistrationRequest.cpp
+429
-293
src/nas/msgs/RegistrationRequest.hpp
src/nas/msgs/RegistrationRequest.hpp
+61
-61
No files found.
src/amf-app/amf_n1.cpp
View file @
66bee1a7
...
...
@@ -1094,11 +1094,11 @@ void amf_n1::registration_request_handle(
// Check 5gs Mobility Identity (Mandatory IE)
std
::
string
guti
=
{};
uint8_t
mobility_id_type
=
registration_request
->
g
etMobileIdentityType
();
uint8_t
mobility_id_type
=
registration_request
->
G
etMobileIdentityType
();
switch
(
mobility_id_type
)
{
case
SUCI
:
{
nas
::
SUCI_imsi_t
imsi
=
{};
if
(
!
registration_request
->
g
etSuciSupiFormatImsi
(
imsi
))
{
if
(
!
registration_request
->
G
etSuciSupiFormatImsi
(
imsi
))
{
Logger
::
amf_n1
().
warn
(
"No SUCI and IMSI for SUPI Format"
);
}
else
{
if
(
!
nc
)
{
...
...
@@ -1303,7 +1303,7 @@ void amf_n1::registration_request_handle(
// Check 5GS_Registration_type IE (Mandatory IE)
uint8_t
reg_type
=
0
;
bool
is_follow_on_req_pending
=
false
;
if
(
!
registration_request
->
g
et5gsRegistrationType
(
if
(
!
registration_request
->
G
et5gsRegistrationType
(
is_follow_on_req_pending
,
reg_type
))
{
Logger
::
amf_n1
().
error
(
"Missing Mandatory IE 5GS Registration type..."
);
send_registration_reject_msg
(
...
...
@@ -1315,7 +1315,7 @@ void amf_n1::registration_request_handle(
// Check ngKSI (Mandatory IE)
uint8_t
ngKSI
=
0
;
if
(
!
registration_request
->
getngKSI
(
ngKSI
))
{
if
(
!
registration_request
->
GetNgKsi
(
ngKSI
))
{
Logger
::
amf_n1
().
error
(
"Missing Mandatory IE ngKSI..."
);
send_registration_reject_msg
(
_5GMM_CAUSE_INVALID_MANDATORY_INFO
,
ran_ue_ngap_id
,
amf_ue_ngap_id
);
...
...
@@ -1327,7 +1327,7 @@ void amf_n1::registration_request_handle(
// inter-system change from S1 to N1 Get 5GMM Capability IE (optional), not
// included for periodic registration updating procedure
uint8_t
_5g_mm_cap
=
0
;
if
(
!
registration_request
->
get5GMM
Capability
(
_5g_mm_cap
))
{
if
(
!
registration_request
->
Get5gmm
Capability
(
_5g_mm_cap
))
{
Logger
::
amf_n1
().
warn
(
"No Optional IE 5GMMCapability available"
);
}
nc
->
mmCapability
=
_5g_mm_cap
;
...
...
@@ -1339,7 +1339,7 @@ void amf_n1::registration_request_handle(
uint8_t
security_cap_eea
=
{
0
};
uint8_t
security_cap_eia
=
{
0
};
if
(
!
registration_request
->
g
etUeSecurityCapability
(
if
(
!
registration_request
->
G
etUeSecurityCapability
(
encrypt_alg
,
integrity_alg
,
security_cap_eea
,
security_cap_eia
))
{
Logger
::
amf_n1
().
warn
(
"No Optional IE UESecurityCapability available"
);
}
else
{
...
...
@@ -1354,7 +1354,7 @@ void amf_n1::registration_request_handle(
nc
->
ueSecurityCapEIA
=
security_cap_eia
;
// Get Requested NSSAI (Optional IE), if provided
if
(
!
registration_request
->
g
etRequestedNssai
(
nc
->
requestedNssai
))
{
if
(
!
registration_request
->
G
etRequestedNssai
(
nc
->
requestedNssai
))
{
Logger
::
amf_n1
().
debug
(
"No Optional IE RequestedNssai available"
);
}
...
...
@@ -1380,7 +1380,7 @@ void amf_n1::registration_request_handle(
registration_request_msg_container
->
Decode
(
(
uint8_t
*
)
bdata
(
nas_msg
),
blength
(
nas_msg
));
if
(
!
registration_request_msg_container
->
g
etRequestedNssai
(
if
(
!
registration_request_msg_container
->
G
etRequestedNssai
(
nc
->
requestedNssai
))
{
Logger
::
amf_n1
().
debug
(
"No Optional IE RequestedNssai available in NAS Container"
);
...
...
@@ -1406,9 +1406,9 @@ void amf_n1::registration_request_handle(
case
MOBILITY_REGISTRATION_UPDATING
:
{
Logger
::
amf_n1
().
debug
(
"Handling Mobility Registration Update..."
);
uint16_t
uplink_data_status
=
0
;
registration_request
->
g
etUplinkDataStatus
(
uplink_data_status
);
registration_request
->
G
etUplinkDataStatus
(
uplink_data_status
);
run_mobility_registration_update_procedure
(
nc
,
uplink_data_status
,
registration_request
->
g
etPduSessionStatus
());
nc
,
uplink_data_status
,
registration_request
->
G
etPduSessionStatus
());
}
break
;
case
PERIODIC_REGISTRATION_UPDATING
:
{
...
...
@@ -1417,7 +1417,7 @@ void amf_n1::registration_request_handle(
run_periodic_registration_update_procedure
(
nc
,
nas_msg
);
else
run_periodic_registration_update_procedure
(
nc
,
registration_request
->
g
etPduSessionStatus
());
nc
,
registration_request
->
G
etPduSessionStatus
());
}
break
;
case
EMERGENCY_REGISTRATION
:
{
...
...
@@ -2541,7 +2541,7 @@ void amf_n1::security_mode_complete_handle(
// bdestroy_wrapper(&nas_msg_container); // free buffer
// Get Requested NSSAI (Optional IE), if provided
if
(
registration_request
->
g
etRequestedNssai
(
nc
->
requestedNssai
))
{
if
(
registration_request
->
G
etRequestedNssai
(
nc
->
requestedNssai
))
{
for
(
auto
s
:
nc
->
requestedNssai
)
{
Logger
::
amf_n1
().
debug
(
"Requested NSSAI: %s"
,
s
.
ToString
().
c_str
());
}
...
...
@@ -2802,8 +2802,8 @@ void amf_n1::registration_complete_handle(
std::make_unique<ConfigurationUpdateCommand>();
configuration_update_command->SetHeader(PLAIN_5GS_MSG);
configuration_update_command->
s
etFullNameForNetwork("Testing"); // TODO:
configuration_update_command->
s
etShortNameForNetwork("Testing"); // TODO:
configuration_update_command->
S
etFullNameForNetwork("Testing"); // TODO:
configuration_update_command->
S
etShortNameForNetwork("Testing"); // TODO:
uint8_t buffer[BUFFER_SIZE_1024] = {0};
int encoded_size =
...
...
@@ -3054,7 +3054,7 @@ void amf_n1::ue_initiate_de_registration_handle(
// TODO: validate 5G Mobile Identity
uint8_t
mobile_id_type
=
0
;
dereg_request
->
g
etMobilityIdentityType
(
mobile_id_type
);
dereg_request
->
G
etMobilityIdentityType
(
mobile_id_type
);
Logger
::
amf_n1
().
debug
(
"5G Mobile Identity %X"
,
mobile_id_type
);
switch
(
mobile_id_type
)
{
case
_5G_GUTI
:
{
...
...
@@ -3137,7 +3137,7 @@ void amf_n1::ue_initiate_de_registration_handle(
// Check Deregistration type
uint8_t
deregType
=
0
;
dereg_request
->
g
etDeregistrationType
(
deregType
);
dereg_request
->
G
etDeregistrationType
(
deregType
);
Logger
::
amf_n1
().
debug
(
"De-registration Type 0x%x"
,
deregType
);
// If UE switch-off, don't need to send Deregistration Accept
...
...
@@ -3574,7 +3574,7 @@ void amf_n1::run_periodic_registration_update_procedure(
amf_cfg
.
guami
.
AmfSetID
,
amf_cfg
.
guami
.
AmfPointer
,
uc
->
tmsi
);
uint16_t
pdu_session_status
=
0xffff
;
pdu_session_status
=
registration_request
->
g
etPduSessionStatus
();
pdu_session_status
=
registration_request
->
G
etPduSessionStatus
();
if
(
pdu_session_status
==
0x0000
)
{
reg_accept
->
SetPduSessionStatus
(
0x0000
);
}
else
{
...
...
@@ -4107,7 +4107,7 @@ void amf_n1::initialize_registration_accept(
item
.
tac_list
.
push_back
(
p
.
tac
);
tai_list
.
push_back
(
item
);
}
registration_accept
->
s
etTaiList
(
tai_list
);
registration_accept
->
S
etTaiList
(
tai_list
);
// Network Feature Support
// TODO: remove hardcoded values
...
...
src/nas/ies/5GSRegistrationType.hpp
View file @
66bee1a7
...
...
@@ -46,10 +46,10 @@ class _5GSRegistrationType : public Type1NasIeFormatTv {
void
set
(
const
bool
&
follow_on_req
,
const
uint8_t
&
type
,
const
uint8_t
&
iei
);
void
set
(
const
bool
&
follow_on_req
,
const
uint8_t
&
type
);
void
setFollowOnReq
(
const
bool
is
);
void
setFollowOnReq
(
bool
is
);
bool
isFollowOnReq
();
void
setRegType
(
const
uint8_t
type
);
void
setRegType
(
uint8_t
type
);
uint8_t
getRegType
();
private:
...
...
src/nas/ies/LADN_Indication.cpp
View file @
66bee1a7
...
...
@@ -48,7 +48,7 @@ LadnIndication::LadnIndication(const std::vector<bstring>& ladn)
LadnIndication
::~
LadnIndication
()
{}
//------------------------------------------------------------------------------
void
LadnIndication
::
GetValue
(
std
::
vector
<
bstring
>&
ladn
)
{
void
LadnIndication
::
GetValue
(
std
::
vector
<
bstring
>&
ladn
)
const
{
ladn
.
assign
(
LADN
.
begin
(),
LADN
.
end
());
}
...
...
src/nas/ies/LADN_Indication.hpp
View file @
66bee1a7
...
...
@@ -39,7 +39,7 @@ class LadnIndication : Type6NasIe {
static
std
::
string
GetIeName
()
{
return
kLadnIndicationIeName
;
}
// void SetValue(const std::vector<bstring>& ladn);
void
GetValue
(
std
::
vector
<
bstring
>&
ladn
);
void
GetValue
(
std
::
vector
<
bstring
>&
ladn
)
const
;
int
Encode
(
uint8_t
*
buf
,
int
len
);
int
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_option
);
...
...
src/nas/ies/_5GSDeregistrationType.cpp
View file @
66bee1a7
...
...
@@ -85,7 +85,7 @@ void _5GSDeregistrationType::set(_5gs_deregistration_type_t type) {
}
//------------------------------------------------------------------------------
void
_5GSDeregistrationType
::
get
(
_5gs_deregistration_type_t
&
type
)
{
void
_5GSDeregistrationType
::
get
(
_5gs_deregistration_type_t
&
type
)
const
{
type
.
switch_off
=
u1
.
bf
.
switch_off
;
type
.
re_registration_required
=
u1
.
bf
.
re_registration_required
;
type
.
access_type
=
u1
.
bf
.
access_type
;
...
...
@@ -98,7 +98,7 @@ void _5GSDeregistrationType::set(uint8_t type) {
}
//------------------------------------------------------------------------------
void
_5GSDeregistrationType
::
get
(
uint8_t
&
type
)
{
void
_5GSDeregistrationType
::
get
(
uint8_t
&
type
)
const
{
type
=
u1
.
b
;
}
...
...
src/nas/ies/_5GSDeregistrationType.hpp
View file @
66bee1a7
...
...
@@ -48,13 +48,13 @@ class _5GSDeregistrationType : public Type1NasIeFormatTv {
// int Encode(uint8_t* buf, int len);
void
set
(
_5gs_deregistration_type_t
type
);
void
get
(
_5gs_deregistration_type_t
&
type
);
void
get
(
_5gs_deregistration_type_t
&
type
)
const
;
void
set
(
uint8_t
value
);
void
get
(
uint8_t
&
value
);
void
get
(
uint8_t
&
value
)
const
;
void
set
(
uint8_t
iei
,
uint8_t
value
);
void
get
(
uint8_t
&
iei
,
uint8_t
value
);
void
get
(
uint8_t
&
iei
,
uint8_t
value
)
const
;
private:
void
setValue
();
...
...
src/nas/ies/_5gsUpdateType.cpp
View file @
66bee1a7
...
...
@@ -72,22 +72,22 @@ void _5gsUpdateType::SetSms(uint8_t value) {
}
//------------------------------------------------------------------------------
uint8_t
_5gsUpdateType
::
GetEpsPnbCiot
()
{
uint8_t
_5gsUpdateType
::
GetEpsPnbCiot
()
const
{
return
eps_pnb_ciot_
;
}
//------------------------------------------------------------------------------
uint8_t
_5gsUpdateType
::
Get5gsPnbCiot
()
{
uint8_t
_5gsUpdateType
::
Get5gsPnbCiot
()
const
{
return
_5gs_pnb_ciot_
;
}
//------------------------------------------------------------------------------
bool
_5gsUpdateType
::
GetNgRan
()
{
bool
_5gsUpdateType
::
GetNgRan
()
const
{
return
ng_ran_
;
}
//------------------------------------------------------------------------------
bool
_5gsUpdateType
::
GetSms
()
{
bool
_5gsUpdateType
::
GetSms
()
const
{
return
sms_
;
}
...
...
src/nas/ies/_5gsUpdateType.hpp
View file @
66bee1a7
...
...
@@ -42,10 +42,10 @@ class _5gsUpdateType : public Type4NasIe {
void
Set5gsPnbCiot
(
uint8_t
value
);
void
SetNgRan
(
uint8_t
value
);
void
SetSms
(
uint8_t
value
);
uint8_t
GetEpsPnbCiot
();
uint8_t
Get5gsPnbCiot
();
bool
GetNgRan
();
bool
GetSms
();
uint8_t
GetEpsPnbCiot
()
const
;
uint8_t
Get5gsPnbCiot
()
const
;
bool
GetNgRan
()
const
;
bool
GetSms
()
const
;
int
Encode
(
uint8_t
*
buf
,
int
len
);
int
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_option
);
...
...
src/nas/msgs/RegistrationRequest.cpp
View file @
66bee1a7
...
...
@@ -63,12 +63,12 @@ void RegistrationRequest::SetHeader(uint8_t security_header_type) {
}
//------------------------------------------------------------------------------
void
RegistrationRequest
::
s
et5gsRegistrationType
(
bool
is_for
,
uint8_t
type
)
{
void
RegistrationRequest
::
S
et5gsRegistrationType
(
bool
is_for
,
uint8_t
type
)
{
ie_5gs_registration_type
.
set
(
is_for
,
type
);
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
g
et5gsRegistrationType
(
bool
RegistrationRequest
::
G
et5gsRegistrationType
(
bool
&
is_for
,
uint8_t
&
reg_type
)
{
is_for
=
ie_5gs_registration_type
.
isFollowOnReq
();
reg_type
=
ie_5gs_registration_type
.
getRegType
();
...
...
@@ -83,7 +83,7 @@ void RegistrationRequest::SetNgKsi(uint8_t tsc, uint8_t key_set_id) {
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
getngKSI
(
uint8_t
&
ng_ksi
)
{
bool
RegistrationRequest
::
GetNgKsi
(
uint8_t
&
ng_ksi
)
const
{
ng_ksi
=
(
ie_ngKSI
.
GetTypeOfSecurityContext
())
|
ie_ngKSI
.
GetNasKeyIdentifier
();
return
true
;
...
...
@@ -91,8 +91,9 @@ bool RegistrationRequest::getngKSI(uint8_t& ng_ksi) {
//------------------------------------------------------------------------------
void
RegistrationRequest
::
SetSuciSupiFormatImsi
(
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
uint8_t
protection_sch_id
,
const
string
msin
)
{
const
std
::
string
&
mcc
,
const
std
::
string
&
mnc
,
const
std
::
string
&
routing_ind
,
uint8_t
protection_sch_id
,
const
std
::
string
&
msin
)
{
if
(
protection_sch_id
!=
NULL_SCHEME
)
{
Logger
::
nas_mm
().
error
(
"encoding suci and supi format for imsi error, please choose right "
...
...
@@ -100,23 +101,23 @@ void RegistrationRequest::SetSuciSupiFormatImsi(
return
;
}
else
{
ie_5gs_mobile_identity
.
SetSuciWithSupiImsi
(
mcc
,
mnc
,
routing
I
nd
,
protection_sch_id
,
msin
);
mcc
,
mnc
,
routing
_i
nd
,
protection_sch_id
,
msin
);
}
}
//------------------------------------------------------------------------------
uint8_t
RegistrationRequest
::
getMobileIdentityType
()
{
uint8_t
RegistrationRequest
::
GetMobileIdentityType
()
const
{
return
ie_5gs_mobile_identity
.
GetTypeOfIdentity
();
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
getSuciSupiFormatImsi
(
nas
::
SUCI_imsi_t
&
imsi
)
{
bool
RegistrationRequest
::
GetSuciSupiFormatImsi
(
nas
::
SUCI_imsi_t
&
imsi
)
const
{
ie_5gs_mobile_identity
.
GetSuciWithSupiImsi
(
imsi
);
return
true
;
}
//------------------------------------------------------------------------------
std
::
string
RegistrationRequest
::
Get5gGuti
()
{
std
::
string
RegistrationRequest
::
Get5gGuti
()
const
{
std
::
optional
<
nas
::
_5G_GUTI_t
>
guti
=
std
::
nullopt
;
ie_5gs_mobile_identity
.
Get5gGuti
(
guti
);
if
(
!
guti
.
has_value
())
return
{};
...
...
@@ -132,9 +133,9 @@ std::string RegistrationRequest::Get5gGuti() {
//------------------------------------------------------------------------------
// Additional_GUTI
void
RegistrationRequest
::
setAdditional_GUTI_SUCI_SUPI_format_IMSI
(
const
st
ring
mcc
,
const
string
mnc
,
uint8_t
amf_region_id
,
uint8_t
amf_set_id
,
uint8_t
amf_pointer
,
const
st
ring
_5g_tmsi
)
{
void
RegistrationRequest
::
SetAdditionalGuti
(
const
st
d
::
string
&
mcc
,
const
std
::
string
&
mnc
,
uint8_t
amf_region_id
,
uint8_t
amf_set_id
,
uint8_t
amf_pointer
,
const
st
d
::
string
&
_5g_tmsi
)
{
_5GSMobileIdentity
ie_additional_guti_tmp
=
{};
ie_additional_guti_tmp
.
SetIei
(
kIei5gGuti
);
uint32_t
tmsi
=
fromString
<
uint32_t
>
(
_5g_tmsi
);
...
...
@@ -145,7 +146,7 @@ void RegistrationRequest::setAdditional_GUTI_SUCI_SUPI_format_IMSI(
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
getAdditionalGuti
(
nas
::
_5G_GUTI_t
&
guti
)
{
bool
RegistrationRequest
::
GetAdditionalGuti
(
nas
::
_5G_GUTI_t
&
guti
)
const
{
if
(
ie_additional_guti
.
has_value
())
{
std
::
optional
<
nas
::
_5G_GUTI_t
>
guti
=
std
::
nullopt
;
ie_additional_guti
.
value
().
Get5gGuti
(
guti
);
...
...
@@ -158,8 +159,11 @@ bool RegistrationRequest::getAdditionalGuti(nas::_5G_GUTI_t& guti) {
//------------------------------------------------------------------------------
void
RegistrationRequest
::
SetSuciSupiFormatImsi
(
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
uint8_t
protection_sch_id
,
uint8_t
hnpki
,
const
string
msin
)
{}
const
std
::
string
&
mcc
,
const
std
::
string
&
mnc
,
const
std
::
string
&
routing_ind
,
uint8_t
protection_sch_id
,
uint8_t
hnpki
,
const
std
::
string
&
msin
)
{
// TODO:
}
//------------------------------------------------------------------------------
void
RegistrationRequest
::
Set5gGuti
()
{}
...
...
@@ -171,14 +175,14 @@ void RegistrationRequest::SetImeiImeisv() {}
void
RegistrationRequest
::
Set5gSTmsi
()
{}
//------------------------------------------------------------------------------
void
RegistrationRequest
::
s
etNonCurrentNativeNasKSI
(
void
RegistrationRequest
::
S
etNonCurrentNativeNasKSI
(
uint8_t
tsc
,
uint8_t
key_set_id
)
{
ie_non_current_native_nas_ksi
=
std
::
make_optional
<
NasKeySetIdentifier
>
(
kIeiNasKeySetIdentifier
,
tsc
,
key_set_id
);
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
g
etNonCurrentNativeNasKSI
(
uint8_t
&
value
)
const
{
bool
RegistrationRequest
::
G
etNonCurrentNativeNasKSI
(
uint8_t
&
value
)
const
{
if
(
ie_non_current_native_nas_ksi
.
has_value
())
{
value
|=
(
ie_non_current_native_nas_ksi
.
value
().
GetTypeOfSecurityContext
())
|
...
...
@@ -190,12 +194,13 @@ bool RegistrationRequest::getNonCurrentNativeNasKSI(uint8_t& value) const {
}
//------------------------------------------------------------------------------
void
RegistrationRequest
::
set5GMMCapability
(
uint8_t
value
)
{
ie_5g_mm_capability
=
std
::
make_optional
<
_5GMMCapability
>
(
0x10
,
value
);
void
RegistrationRequest
::
Set5gmmCapability
(
uint8_t
value
)
{
ie_5g_mm_capability
=
std
::
make_optional
<
_5GMMCapability
>
(
kIei5gmmCapability
,
value
);
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
get5GMMCapability
(
uint8_t
&
value
)
{
bool
RegistrationRequest
::
Get5gmmCapability
(
uint8_t
&
value
)
const
{
if
(
ie_5g_mm_capability
.
has_value
())
{
value
=
ie_5g_mm_capability
.
value
().
GetOctet3
();
// TODO: get multiple octets
...
...
@@ -205,21 +210,21 @@ bool RegistrationRequest::get5GMMCapability(uint8_t& value) {
}
//------------------------------------------------------------------------------
void
RegistrationRequest
::
setUESecurityCapability
(
uint8_t
g_EASel
,
uint8_t
g_IASel
)
{
ie_ue_security_capability
=
std
::
make_optional
<
UESecurityCapability
>
(
0x2E
,
g_EASel
,
g_IASel
);
void
RegistrationRequest
::
SetUeSecurityCapability
(
uint8_t
ea
,
uint8_t
ia
)
{
ie_ue_security_capability
=
std
::
make_optional
<
UESecurityCapability
>
(
kIeiUeSecurityCapability
,
ea
,
ia
);
}
//------------------------------------------------------------------------------
void
RegistrationRequest
::
setUE
SecurityCapability
(
uint8_t
g_EASel
,
uint8_t
g_IASel
,
uint8_t
eea
,
uint8_t
eia
)
{
void
RegistrationRequest
::
SetUe
SecurityCapability
(
uint8_t
ea
,
uint8_t
ia
,
uint8_t
eea
,
uint8_t
eia
)
{
ie_ue_security_capability
=
std
::
make_optional
<
UESecurityCapability
>
(
0x2E
,
g_EASel
,
g_IASel
,
eea
,
eia
);
kIeiUeSecurityCapability
,
ea
,
ia
,
eea
,
eia
);
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
getUeSecurityCapability
(
uint8_t
&
ea
,
uint8_t
&
ia
)
{
bool
RegistrationRequest
::
GetUeSecurityCapability
(
uint8_t
&
ea
,
uint8_t
&
ia
)
const
{
if
(
ie_ue_security_capability
.
has_value
())
{
ea
=
ie_ue_security_capability
.
value
().
GetEa
();
ia
=
ie_ue_security_capability
.
value
().
GetIa
();
...
...
@@ -231,8 +236,8 @@ bool RegistrationRequest::getUeSecurityCapability(uint8_t& ea, uint8_t& ia) {
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
g
etUeSecurityCapability
(
uint8_t
&
ea
,
uint8_t
&
ia
,
uint8_t
&
eea
,
uint8_t
&
eia
)
{
bool
RegistrationRequest
::
G
etUeSecurityCapability
(
uint8_t
&
ea
,
uint8_t
&
ia
,
uint8_t
&
eea
,
uint8_t
&
eia
)
const
{
if
(
ie_ue_security_capability
.
has_value
())
{
ea
=
ie_ue_security_capability
.
value
().
GetEa
();
ia
=
ie_ue_security_capability
.
value
().
GetIa
();
...
...
@@ -248,14 +253,14 @@ bool RegistrationRequest::getUeSecurityCapability(
}
//------------------------------------------------------------------------------
void
RegistrationRequest
::
setRequestedNSSAI
(
std
::
vector
<
struct
SNSSAI_s
>
nssai
)
{
void
RegistrationRequest
::
SetRequestedNssai
(
const
std
::
vector
<
struct
SNSSAI_s
>&
nssai
)
{
ie_requested_NSSAI
=
std
::
make_optional
<
NSSAI
>
(
kIeiNSSAIRequested
,
nssai
);
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
g
etRequestedNssai
(
std
::
vector
<
struct
SNSSAI_s
>&
nssai
)
{
bool
RegistrationRequest
::
G
etRequestedNssai
(
std
::
vector
<
struct
SNSSAI_s
>&
nssai
)
const
{
if
(
ie_requested_NSSAI
.
has_value
())
{
ie_requested_NSSAI
.
value
().
GetValue
(
nssai
);
}
else
{
...
...
@@ -265,21 +270,21 @@ bool RegistrationRequest::getRequestedNssai(
}
//------------------------------------------------------------------------------
void
RegistrationRequest
::
setLastVisitedRegisteredTAI
(
const
std
::
string
&
mcc
,
const
std
::
string
mnc
,
const
uint32_t
&
tac
)
{
void
RegistrationRequest
::
SetLastVisitedRegisteredTai
(
const
std
::
string
&
mcc
,
const
std
::
string
&
mnc
,
uint32_t
tac
)
{
ie_last_visited_registered_TAI
=
std
::
make_optional
<
_5GSTrackingAreaIdentity
>
(
mcc
,
mnc
,
tac
);
}
//------------------------------------------------------------------------------
void
RegistrationRequest
::
setUENetworkCapability
(
uint8_t
g_EEASel
,
uint8_t
g_EIASel
)
{
ie_s1_ue_network_capability
=
std
::
make_optional
<
UENetworkCapability
>
(
0x17
,
g_EEASel
,
g_EIASel
);
void
RegistrationRequest
::
SetUeNetworkCapability
(
uint8_t
eea
,
uint8_t
eia
)
{
ie_s1_ue_network_capability
=
std
::
make_optional
<
UENetworkCapability
>
(
kIeiUeNetworkCapability
,
eea
,
eia
);
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
getS1UeNetworkCapability
(
uint8_t
&
eea
,
uint8_t
&
eia
)
{
bool
RegistrationRequest
::
GetS1UeNetworkCapability
(
uint8_t
&
eea
,
uint8_t
&
eia
)
const
{
if
(
ie_s1_ue_network_capability
.
has_value
())
{
eea
=
ie_s1_ue_network_capability
.
value
().
GetEea
();
eia
=
ie_s1_ue_network_capability
.
value
().
GetEia
();
...
...
@@ -290,12 +295,12 @@ bool RegistrationRequest::getS1UeNetworkCapability(uint8_t& eea, uint8_t& eia) {
}
//------------------------------------------------------------------------------
void
RegistrationRequest
::
setUplinkDataStatus
(
const
uint16_t
&
value
)
{
void
RegistrationRequest
::
SetUplinkDataStatus
(
uint16_t
value
)
{
ie_uplink_data_status
=
std
::
make_optional
<
UplinkDataStatus
>
(
value
);
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
getUplinkDataStatus
(
uint16_t
&
value
)
{
bool
RegistrationRequest
::
GetUplinkDataStatus
(
uint16_t
&
value
)
const
{
if
(
ie_uplink_data_status
.
has_value
())
{
value
=
ie_uplink_data_status
.
value
().
GetValue
();
return
true
;
...
...
@@ -305,12 +310,12 @@ bool RegistrationRequest::getUplinkDataStatus(uint16_t& value) {
}
//------------------------------------------------------------------------------
void
RegistrationRequest
::
setPDU
SessionStatus
(
uint16_t
value
)
{
void
RegistrationRequest
::
SetPdu
SessionStatus
(
uint16_t
value
)
{
ie_PDU_session_status
=
std
::
make_optional
<
PDUSessionStatus
>
(
value
);
}
//------------------------------------------------------------------------------
uint16_t
RegistrationRequest
::
getPduSessionStatus
()
{
uint16_t
RegistrationRequest
::
GetPduSessionStatus
()
const
{
if
(
ie_PDU_session_status
.
has_value
())
{
return
ie_PDU_session_status
.
value
().
GetValue
();
}
else
{
...
...
@@ -319,12 +324,13 @@ uint16_t RegistrationRequest::getPduSessionStatus() {
}
//------------------------------------------------------------------------------
void
RegistrationRequest
::
setMICO
Indication
(
bool
sprti
,
bool
raai
)
{
void
RegistrationRequest
::
SetMico
Indication
(
bool
sprti
,
bool
raai
)
{
ie_MICO_indication
=
std
::
make_optional
<
MicoIndication
>
(
sprti
,
raai
);
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
getMicoIndication
(
uint8_t
&
sprti
,
uint8_t
&
raai
)
{
bool
RegistrationRequest
::
GetMicoIndication
(
uint8_t
&
sprti
,
uint8_t
&
raai
)
const
{
if
(
ie_MICO_indication
.
has_value
())
{
sprti
=
ie_MICO_indication
.
value
().
GetSprti
();
raai
=
ie_MICO_indication
.
value
().
GetRaai
();
...
...
@@ -335,15 +341,16 @@ bool RegistrationRequest::getMicoIndication(uint8_t& sprti, uint8_t& raai) {
}
//------------------------------------------------------------------------------
void
RegistrationRequest
::
setUE
Status
(
bool
n1
,
bool
s1
)
{
void
RegistrationRequest
::
SetUe
Status
(
bool
n1
,
bool
s1
)
{
ie_ue_status
=
std
::
make_optional
<
UEStatus
>
(
n1
,
s1
);
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
getUeStatus
(
uint8_t
&
n1ModeReg
,
uint8_t
&
s1ModeReg
)
{
bool
RegistrationRequest
::
GetUeStatus
(
uint8_t
&
n1_mode
,
uint8_t
&
s1_mode
)
const
{
if
(
ie_ue_status
.
has_value
())
{
n1
ModeReg
=
ie_ue_status
.
value
().
GetN1
();
s1
ModeReg
=
ie_ue_status
.
value
().
GetS1
();
n1
_mode
=
ie_ue_status
.
value
().
GetN1
();
s1
_mode
=
ie_ue_status
.
value
().
GetS1
();
return
true
;
}
else
{
return
false
;
...
...
@@ -351,13 +358,13 @@ bool RegistrationRequest::getUeStatus(uint8_t& n1ModeReg, uint8_t& s1ModeReg) {
}
//------------------------------------------------------------------------------
void
RegistrationRequest
::
setAllowedPDU
SessionStatus
(
uint16_t
value
)
{
void
RegistrationRequest
::
SetAllowedPdu
SessionStatus
(
uint16_t
value
)
{
ie_allowed_PDU_session_status
=
std
::
make_optional
<
AllowedPDUSessionStatus
>
(
value
);
}
//------------------------------------------------------------------------------
uint16_t
RegistrationRequest
::
getAllowedPduSessionStatus
()
{
uint16_t
RegistrationRequest
::
GetAllowedPduSessionStatus
()
const
{
if
(
ie_allowed_PDU_session_status
.
has_value
())
{
return
ie_allowed_PDU_session_status
.
value
().
GetValue
();
}
else
{
...
...
@@ -366,12 +373,12 @@ uint16_t RegistrationRequest::getAllowedPduSessionStatus() {
}
//------------------------------------------------------------------------------
void
RegistrationRequest
::
setUES_Usage_
Setting
(
bool
ues_usage_setting
)
{
void
RegistrationRequest
::
SetUeUsage
Setting
(
bool
ues_usage_setting
)
{
ie_ues_usage_setting
=
std
::
make_optional
<
UEUsageSetting
>
(
ues_usage_setting
);
}
//------------------------------------------------------------------------------
uint8_t
RegistrationRequest
::
getUEsUsageSetting
()
{
uint8_t
RegistrationRequest
::
GetUeUsageSetting
()
const
{
if
(
ie_ues_usage_setting
.
has_value
())
{
return
ie_ues_usage_setting
.
value
().
GetValue
();
}
else
{
...
...
@@ -385,7 +392,7 @@ void RegistrationRequest::Set5gsDrxParameters(uint8_t value) {
}
//------------------------------------------------------------------------------
uint8_t
RegistrationRequest
::
get5GSDrxParameters
()
{
uint8_t
RegistrationRequest
::
Get5gsDrxParameters
()
const
{
if
(
ie_5gs_drx_parameters
.
has_value
())
{
return
ie_5gs_drx_parameters
.
value
().
GetValue
();
}
else
{
...
...
@@ -394,13 +401,13 @@ uint8_t RegistrationRequest::get5GSDrxParameters() {
}
//------------------------------------------------------------------------------
void
RegistrationRequest
::
setEPS_NAS_Message_Container
(
bstring
value
)
{
void
RegistrationRequest
::
SetEpsNasMessageContainer
(
const
bstring
&
value
)
{
ie_eps_nas_message_container
=
std
::
make_optional
<
EPS_NAS_Message_Container
>
(
value
);
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
getEpsNasMessageContainer
(
bstring
&
epsNas
)
{
bool
RegistrationRequest
::
GetEpsNasMessageContainer
(
bstring
&
epsNas
)
const
{
if
(
ie_eps_nas_message_container
)
{
ie_eps_nas_message_container
->
getValue
(
epsNas
);
return
true
;
...
...
@@ -410,14 +417,16 @@ bool RegistrationRequest::getEpsNasMessageContainer(bstring& epsNas) {
}
//------------------------------------------------------------------------------
void
RegistrationRequest
::
setLADN_Indication
(
std
::
vector
<
bstring
>
ladnValue
)
{
ie_ladn_indication
=
std
::
make_optional
<
LadnIndication
>
(
ladnValue
);
void
RegistrationRequest
::
SetLadnIndication
(
const
std
::
vector
<
bstring
>&
ladn_value
)
{
ie_ladn_indication
=
std
::
make_optional
<
LadnIndication
>
(
ladn_value
);
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
getLadnIndication
(
std
::
vector
<
bstring
>&
ladnValue
)
{
bool
RegistrationRequest
::
GetLadnIndication
(
std
::
vector
<
bstring
>&
ladn_value
)
const
{
if
(
ie_ladn_indication
.
has_value
())
{
ie_ladn_indication
.
value
().
GetValue
(
ladn
V
alue
);
ie_ladn_indication
.
value
().
GetValue
(
ladn
_v
alue
);
return
true
;
}
else
{
return
false
;
...
...
@@ -431,7 +440,7 @@ void RegistrationRequest::SetPayloadContainerType(uint8_t value) {
}
//------------------------------------------------------------------------------
uint8_t
RegistrationRequest
::
GetPayloadContainerType
()
{
uint8_t
RegistrationRequest
::
GetPayloadContainerType
()
const
{
if
(
ie_payload_container_type
.
has_value
())
{
return
ie_payload_container_type
.
value
().
GetValue
();
}
else
{
...
...
@@ -441,14 +450,14 @@ uint8_t RegistrationRequest::GetPayloadContainerType() {
//------------------------------------------------------------------------------
void
RegistrationRequest
::
SetPayloadContainer
(
std
::
vector
<
PayloadContainerEntry
>
content
)
{
const
std
::
vector
<
PayloadContainerEntry
>&
content
)
{
ie_payload_container
=
std
::
make_optional
<
Payload_Container
>
(
kIeiPayloadContainer
,
content
);
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
GetPayloadContainer
(
std
::
vector
<
PayloadContainerEntry
>&
content
)
{
std
::
vector
<
PayloadContainerEntry
>&
content
)
const
{
if
(
ie_payload_container
.
has_value
())
{
return
ie_payload_container
.
value
().
GetValue
(
content
);
}
else
{
...
...
@@ -463,8 +472,8 @@ void RegistrationRequest::SetNetworkSlicingIndication(bool dcni, bool nssci) {
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
g
etNetworkSlicingIndication
(
uint8_t
&
dcni
,
uint8_t
&
nssci
)
{
bool
RegistrationRequest
::
G
etNetworkSlicingIndication
(
uint8_t
&
dcni
,
uint8_t
&
nssci
)
const
{
if
(
ie_network_slicing_indication
.
has_value
())
{
dcni
=
ie_network_slicing_indication
.
value
().
GetDcni
();
nssci
=
ie_network_slicing_indication
.
value
().
GetNssci
();
...
...
@@ -475,16 +484,16 @@ bool RegistrationRequest::getNetworkSlicingIndication(
}
//------------------------------------------------------------------------------
void
RegistrationRequest
::
set_5GS_Update_
Type
(
void
RegistrationRequest
::
Set5gsUpdate
Type
(
uint8_t
eps_pnb_ciot
,
uint8_t
_5gs_pnb_ciot
,
bool
ng_ran
,
bool
sms
)
{
ie_5gs_update_type
=
std
::
make_optional
<
_5gsUpdateType
>
(
eps_pnb_ciot
,
_5gs_pnb_ciot
,
ng_ran
,
sms
);
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
get5GS
UpdateType
(
bool
RegistrationRequest
::
Get5gs
UpdateType
(
uint8_t
&
eps_pnb_ciot
,
uint8_t
&
_5gs_pnb_ciot
,
bool
&
ng_ran_rcu
,
bool
&
sms_requested
)
{
bool
&
sms_requested
)
const
{
if
(
ie_5gs_update_type
.
has_value
())
{
eps_pnb_ciot
=
ie_5gs_update_type
.
value
().
GetEpsPnbCiot
();
_5gs_pnb_ciot
=
ie_5gs_update_type
.
value
().
Get5gsPnbCiot
();
...
...
@@ -497,12 +506,12 @@ bool RegistrationRequest::get5GSUpdateType(
}
//------------------------------------------------------------------------------
void
RegistrationRequest
::
SetNasMessageContainer
(
bstring
value
)
{
void
RegistrationRequest
::
SetNasMessageContainer
(
const
bstring
&
value
)
{
ie_nas_message_container
=
std
::
make_optional
<
NasMessageContainer
>
(
value
);
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
GetNasMessageContainer
(
bstring
&
nas
)
{
bool
RegistrationRequest
::
GetNasMessageContainer
(
bstring
&
nas
)
const
{
if
(
ie_nas_message_container
.
has_value
())
{
ie_nas_message_container
.
value
().
GetValue
(
nas
);
return
true
;
...
...
@@ -518,7 +527,7 @@ void RegistrationRequest::SetEpsBearerContextsStatus(uint16_t value) {
}
//------------------------------------------------------------------------------
bool
RegistrationRequest
::
getEpsBearerContextStatus
(
uint16_t
&
value
)
{
bool
RegistrationRequest
::
GetEpsBearerContextStatus
(
uint16_t
&
value
)
const
{
if
(
ie_eps_bearer_context_status
.
has_value
())
{
value
=
ie_eps_bearer_context_status
.
value
().
GetValue
();
return
true
;
...
...
@@ -544,13 +553,15 @@ int RegistrationRequest::Encode(uint8_t* buf, int len) {
// 5GS Registration Type
if
((
encoded_ie_size
=
ie_5gs_registration_type
.
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding IE 5GS Registration Type error"
);
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
_5GSRegistrationType
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
// ngKSI
if
((
encoded_ie_size
=
ie_ngKSI
.
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding IE ie_ngKSI error"
);
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
NasKeySetIdentifier
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
encoded_size
+=
1
;
// 1/2 for 5GS registration type and 1/2 for ngKSI
...
...
@@ -558,7 +569,8 @@ int RegistrationRequest::Encode(uint8_t* buf, int len) {
// 5GS Mobile Identity
if
((
encoded_ie_size
=
ie_5gs_mobile_identity
.
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding IE 5GS Mobile Identity error"
);
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
_5GSMobileIdentity
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
encoded_size
+=
encoded_ie_size
;
...
...
@@ -566,13 +578,13 @@ int RegistrationRequest::Encode(uint8_t* buf, int len) {
// Non-current native NAS key set identifier
if
(
!
ie_non_current_native_nas_ksi
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE
Non-current native NAS key set identifier is not available"
);
Logger
::
nas_mm
().
debug
(
"IE
%s is not available"
,
NasKeySetIdentifier
::
GetIeName
().
c_str
()
);
}
else
{
if
((
encoded_ie_size
=
ie_non_current_native_nas_ksi
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding
IE Non-current native NAS key set identifier error"
);
"Encoding
%s error"
,
NasKeySetIdentifier
::
GetIeName
().
c_str
()
);
return
KEncodeDecodeError
;
}
else
{
encoded_size
+=
encoded_ie_size
;
...
...
@@ -581,11 +593,13 @@ int RegistrationRequest::Encode(uint8_t* buf, int len) {
// 5GMM capability
if
(
!
ie_5g_mm_capability
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE 5GMM capability is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
_5GMMCapability
::
GetIeName
().
c_str
());
}
else
{
if
((
encoded_ie_size
=
ie_5g_mm_capability
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding 5GMM capability error"
);
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
_5GMMCapability
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
encoded_size
+=
encoded_ie_size
;
...
...
@@ -594,11 +608,13 @@ int RegistrationRequest::Encode(uint8_t* buf, int len) {
// UE security capability
if
(
!
ie_ue_security_capability
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE UE security capability is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
UESecurityCapability
::
GetIeName
().
c_str
());
}
else
{
if
((
encoded_ie_size
=
ie_ue_security_capability
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"encoding UE security capability error"
);
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
UESecurityCapability
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
encoded_size
+=
encoded_ie_size
;
...
...
@@ -607,11 +623,12 @@ int RegistrationRequest::Encode(uint8_t* buf, int len) {
// Requested NSSAI
if
(
!
ie_requested_NSSAI
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE Requested NSSAI is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
NSSAI
::
GetIeName
().
c_str
());
}
else
{
if
((
encoded_ie_size
=
ie_requested_NSSAI
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding
Requested NSSAI error"
);
Logger
::
nas_mm
().
error
(
"Encoding
%s error"
,
NSSAI
::
GetIeName
().
c_str
()
);
return
KEncodeDecodeError
;
}
else
{
encoded_size
+=
encoded_ie_size
;
...
...
@@ -620,220 +637,260 @@ int RegistrationRequest::Encode(uint8_t* buf, int len) {
// Last visited registered TAI
if
(
!
ie_last_visited_registered_TAI
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_Last_visited_registered_TAI is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
_5GSTrackingAreaIdentity
::
GetIeName
().
c_str
());
}
else
{
if
(
int
size
=
ie_last_visited_registered_TAI
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
{
encoded_size
+=
size
;
if
((
encoded_ie_size
=
ie_last_visited_registered_TAI
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
_5GSTrackingAreaIdentity
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
Logger
::
nas_mm
().
error
(
"encoding ie_Last_visited_registered_TAI error"
);
return
0
;
encoded_size
+=
encoded_ie_size
;
}
}
// S1 UE network capability
if
(
!
ie_s1_ue_network_capability
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_s1_ue_network_capability is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
UENetworkCapability
::
GetIeName
().
c_str
());
}
else
{
if
(
int
size
=
ie_s1_ue_network_capability
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
{
encoded_size
+=
size
;
if
((
encoded_ie_size
=
ie_s1_ue_network_capability
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
UENetworkCapability
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
Logger
::
nas_mm
().
error
(
"encoding ie_s1_ue_network_capability error"
);
return
0
;
encoded_size
+=
encoded_ie_size
;
}
}
if
(
!
ie_uplink_data_status
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_uplink_data_status is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
UplinkDataStatus
::
GetIeName
().
c_str
());
}
else
{
if
(
int
size
=
ie_uplink_data_status
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
{
encoded_size
+=
size
;
if
((
encoded_ie_size
=
ie_uplink_data_status
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
UplinkDataStatus
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
Logger
::
nas_mm
().
error
(
"encoding ie_uplink_data_status error"
);
return
0
;
encoded_size
+=
encoded_ie_size
;
}
}
if
(
!
ie_PDU_session_status
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_PDU_session_status is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
PDUSessionStatus
::
GetIeName
().
c_str
());
}
else
{
if
(
int
size
=
ie_PDU_session_status
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
{
encoded_size
+=
size
;
if
((
encoded_ie_size
=
ie_PDU_session_status
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
PDUSessionStatus
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
Logger
::
nas_mm
().
error
(
"encoding ie_PDU_session_status error"
);
return
0
;
encoded_size
+=
encoded_ie_size
;
}
}
if
(
!
ie_MICO_indication
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_MICO_indication is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
MicoIndication
::
GetIeName
().
c_str
());
}
else
{
if
(
int
size
=
ie_MICO_indication
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
{
encoded_size
+=
size
;
if
((
encoded_ie_size
=
ie_MICO_indication
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
MicoIndication
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
Logger
::
nas_mm
().
error
(
"encoding ie_MICO_indication error"
);
return
0
;
encoded_size
+=
encoded_ie_size
;
}
}
if
(
!
ie_ue_status
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_ue_status is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
UEStatus
::
GetIeName
().
c_str
());
}
else
{
if
(
int
size
=
ie_ue_status
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
{
encoded_size
+=
size
;
if
((
encoded_ie_size
=
ie_ue_status
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
UEStatus
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
Logger
::
nas_mm
().
error
(
"encoding ie_ue_status error"
);
return
0
;
encoded_size
+=
encoded_ie_size
;
}
}
if
(
!
ie_additional_guti
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_additional_guti- is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
_5GSMobileIdentity
::
GetIeName
().
c_str
());
}
else
{
if
(
int
size
=
ie_additional_guti
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
{
encoded_size
+=
size
;
if
((
encoded_ie_size
=
ie_additional_guti
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
_5GSMobileIdentity
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
Logger
::
nas_mm
().
error
(
"encoding ie ie_additional_guti error"
);
return
0
;
encoded_size
+=
encoded_ie_size
;
}
}
if
(
!
ie_allowed_PDU_session_status
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_allowed_PDU_session_status is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
AllowedPDUSessionStatus
::
GetIeName
().
c_str
());
}
else
{
if
(
int
size
=
ie_allowed_PDU_session_status
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
{
encoded_size
+=
size
;
if
((
encoded_ie_size
=
ie_allowed_PDU_session_status
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
AllowedPDUSessionStatus
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
Logger
::
nas_mm
().
error
(
"encoding ie_allowed_PDU_session_status error"
);
return
0
;
encoded_size
+=
encoded_ie_size
;
}
}
if
(
!
ie_ues_usage_setting
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_ues_usage_setting is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
UEUsageSetting
::
GetIeName
().
c_str
());
}
else
{
if
(
int
size
=
ie_ues_usage_setting
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
{
encoded_size
+=
size
;
if
((
encoded_ie_size
=
ie_ues_usage_setting
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
UEUsageSetting
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
Logger
::
nas_mm
().
error
(
"encoding ie_ues_usage_setting error"
);
return
0
;
encoded_size
+=
encoded_ie_size
;
}
}
if
(
!
ie_5gs_drx_parameters
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_5gs_drx_parameters is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
_5GS_DRX_Parameters
::
GetIeName
().
c_str
());
}
else
{
if
(
int
size
=
ie_5gs_drx_parameters
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
{
encoded_size
+=
size
;
if
((
encoded_ie_size
=
ie_5gs_drx_parameters
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
_5GS_DRX_Parameters
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
Logger
::
nas_mm
().
error
(
"encoding ie_5gs_drx_parameters error"
);
return
0
;
encoded_size
+=
encoded_ie_size
;
}
}
if
(
!
ie_eps_nas_message_container
)
{
Logger
::
nas_mm
().
warn
(
"IE ie_eps_nas_message_container is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
EPS_NAS_Message_Container
::
GetIeName
().
c_str
());
}
else
{
if
(
int
size
=
ie_eps_nas_message_container
->
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
{
encoded_size
+=
size
;
if
((
encoded_ie_size
=
ie_eps_nas_message_container
->
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
EPS_NAS_Message_Container
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
Logger
::
nas_mm
().
error
(
"encoding ie_eps_nas_message_container error"
);
return
0
;
encoded_size
+=
encoded_ie_size
;
}
}
if
(
!
ie_ladn_indication
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_ladn_indication is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
LadnIndication
::
GetIeName
().
c_str
());
}
else
{
if
(
int
size
=
ie_ladn_indication
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
{
encoded_size
+=
size
;
if
((
encoded_ie_size
=
ie_ladn_indication
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
LadnIndication
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
Logger
::
nas_mm
().
error
(
"encoding ie_ladn_indication error"
);
return
0
;
encoded_size
+=
encoded_ie_size
;
}
}
if
(
!
ie_payload_container_type
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_payload_container_type is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
PayloadContainerType
::
GetIeName
().
c_str
());
}
else
{
if
(
int
size
=
ie_payload_container_type
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
{
encoded_size
+=
size
;
if
((
encoded_ie_size
=
ie_payload_container_type
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
PayloadContainerType
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
Logger
::
nas_mm
().
error
(
"encoding ie_payload_container_type error"
);
return
0
;
encoded_size
+=
encoded_ie_size
;
}
}
if
(
!
ie_payload_container
or
!
ie_payload_container_type
)
{
Logger
::
nas_mm
().
warn
(
"IE ie_payload_container is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
Payload_Container
::
GetIeName
().
c_str
());
}
else
{
if
(
int
size
=
ie_payload_container
->
Encode
(
if
(
(
encoded_ie_
size
=
ie_payload_container
->
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
,
ie_payload_container_type
.
value
().
GetValue
()))
{
encoded_size
+=
size
;
ie_payload_container_type
.
value
().
GetValue
()))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
Payload_Container
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
Logger
::
nas_mm
().
error
(
"encoding ie_payload_container error"
);
return
0
;
encoded_size
+=
encoded_ie_size
;
}
}
if
(
!
ie_network_slicing_indication
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_network_slicing_indication is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
NetworkSlicingIndication
::
GetIeName
().
c_str
());
}
else
{
if
(
int
size
=
ie_network_slicing_indication
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
{
encoded_size
+=
size
;
if
((
encoded_ie_size
=
ie_network_slicing_indication
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
NetworkSlicingIndication
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
Logger
::
nas_mm
().
error
(
"encoding ie_network_slicing_indication error"
);
return
0
;
encoded_size
+=
encoded_ie_size
;
}
}
if
(
!
ie_5gs_update_type
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_5gs_update_type is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
_5gsUpdateType
::
GetIeName
().
c_str
());
}
else
{
if
(
int
size
=
ie_5gs_update_type
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
{
encoded_size
+=
size
;
if
((
encoded_ie_size
=
ie_5gs_update_type
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
_5gsUpdateType
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
Logger
::
nas_mm
().
error
(
"encoding ie_5gs_update_type error"
);
return
0
;
encoded_size
+=
encoded_ie_size
;
}
}
if
(
!
ie_nas_message_container
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_nas_message_container is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
NasMessageContainer
::
GetIeName
().
c_str
());
}
else
{
if
(
int
size
=
ie_nas_message_container
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
{
encoded_size
+=
size
;
if
((
encoded_ie_size
=
ie_nas_message_container
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
NasMessageContainer
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
Logger
::
nas_mm
().
error
(
"encoding ie_nas_message_container error"
);
return
0
;
encoded_size
+=
encoded_ie_size
;
}
}
if
(
!
ie_eps_bearer_context_status
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_eps_bearer_context_status is not available"
);
Logger
::
nas_mm
().
debug
(
"IE %s is not available"
,
EpsBearerContextStatus
::
GetIeName
().
c_str
());
}
else
{
if
(
int
size
=
ie_eps_bearer_context_status
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
{
encoded_size
+=
size
;
if
((
encoded_ie_size
=
ie_eps_bearer_context_status
.
value
().
Encode
(
buf
+
encoded_size
,
len
-
encoded_size
))
==
KEncodeDecodeError
)
{
Logger
::
nas_mm
().
error
(
"Encoding %s error"
,
EpsBearerContextStatus
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
else
{
Logger
::
nas_mm
().
error
(
"encoding ie_eps_bearer_context_status error"
);
return
0
;
encoded_size
+=
encoded_ie_size
;
}
}
Logger
::
nas_mm
().
debug
(
...
...
@@ -866,54 +923,68 @@ int RegistrationRequest::Decode(uint8_t* buf, int len) {
decoded_size
+=
ie_5gs_mobile_identity
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
false
);
uint8_t
octet
=
*
(
buf
+
decoded_size
);
// Decode other IEs
uint8_t
octet
=
0x00
;
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"First option IEI 0x%x"
,
octet
);
bool
flag
=
false
;
while
((
octet
!=
0x0
))
{
Logger
::
nas_mm
().
debug
(
"IEI 0x%x"
,
octet
);
switch
((
octet
&
0xf0
)
>>
4
)
{
case
0xC
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI
(0xC)"
);
case
kIeiNasKeySetIdentifier
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI
0x%x"
,
kIeiNasKeySetIdentifier
);
NasKeySetIdentifier
ie_non_current_native_nas_ksi_tmp
=
{};
if
((
decoded_result
=
ie_non_current_native_nas_ksi_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
false
,
true
))
<=
0
)
return
decoded_result
;
buf
+
decoded_size
,
len
-
decoded_size
,
false
,
true
))
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
decoded_size
+=
decoded_result
;
ie_non_current_native_nas_ksi
=
std
::
optional
<
NasKeySetIdentifier
>
(
ie_non_current_native_nas_ksi_tmp
);
decoded_size
+=
decoded_result
;
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
0xB
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI
(0xB)"
);
case
kIeiMicoIndication
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI
0x%x"
,
kIeiMicoIndication
);
MicoIndication
ie_MICO_indication_tmp
=
{};
decoded_size
+=
ie_MICO_indication_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
if
((
decoded_result
=
ie_MICO_indication_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
decoded_size
+=
decoded_result
;
ie_MICO_indication
=
std
::
optional
<
MicoIndication
>
(
ie_MICO_indication_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
kIeiPayloadContainerType
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x
8: Payload Container Type"
);
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x
%x"
,
kIeiPayloadContainerType
);
PayloadContainerType
ie_payload_container_type_tmp
=
{};
decoded_size
+=
ie_payload_container_type_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
if
((
decoded_result
=
ie_payload_container_type_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
decoded_size
+=
decoded_result
;
ie_payload_container_type
=
std
::
optional
<
PayloadContainerType
>
(
ie_payload_container_type_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
0x9
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI (0x9)"
);
case
kIeiNetworkSlicingIndication
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiNetworkSlicingIndication
);
NetworkSlicingIndication
ie_network_slicing_indication_tmp
=
{};
decoded_size
+=
ie_network_slicing_indication_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
if
((
decoded_result
=
ie_network_slicing_indication_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
decoded_size
+=
decoded_result
;
ie_network_slicing_indication
=
std
::
optional
<
NetworkSlicingIndication
>
(
ie_network_slicing_indication_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
...
...
@@ -924,42 +995,46 @@ int RegistrationRequest::Decode(uint8_t* buf, int len) {
switch
(
octet
)
{
case
kIei5gmmCapability
:
{
Logger
::
nas_mm
().
debug
(
"Decoding
5GMMCapability (IEI 0x10)"
);
Logger
::
nas_mm
().
debug
(
"Decoding
IEI 0x%x"
,
kIei5gmmCapability
);
_5GMMCapability
ie_5g_mm_capability_tmp
=
{};
if
((
decoded_
size_ie
=
ie_5g_mm_capability_tmp
.
Decode
(
if
((
decoded_
result
=
ie_5g_mm_capability_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
{
return
KEncodeDecodeError
;
}
decoded_size
+=
decoded_
size_ie
;
decoded_size
+=
decoded_
result
;
ie_5g_mm_capability
=
std
::
optional
<
_5GMMCapability
>
(
ie_5g_mm_capability_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
0x2E
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI
(0x2E)"
);
case
kIeiUeSecurityCapability
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI
0x%x"
,
kIeiUeSecurityCapability
);
UESecurityCapability
ie_ue_security_capability_tmp
=
{};
if
((
decoded_
size_ie
=
ie_ue_security_capability_tmp
.
Decode
(
if
((
decoded_
result
=
ie_ue_security_capability_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
{
return
KEncodeDecodeError
;
}
decoded_size
+=
decoded_
size_ie
;
decoded_size
+=
decoded_
result
;
ie_ue_security_capability
=
std
::
optional
<
UESecurityCapability
>
(
ie_ue_security_capability_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
kIeiNSSAIRequested
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI %d"
,
kIeiNSSAIRequested
);
NSSAI
ie_requested_NSSAI_tmp
=
{};
decoded_size
+=
ie_requested_NSSAI_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
if
((
decoded_result
=
ie_requested_NSSAI_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
{
return
KEncodeDecodeError
;
}
decoded_size
+=
decoded_result
;
ie_requested_NSSAI
=
std
::
make_optional
<
NSSAI
>
(
ie_requested_NSSAI_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
...
...
@@ -967,166 +1042,227 @@ int RegistrationRequest::Decode(uint8_t* buf, int len) {
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIei5gsTrackingAreaIdentity
);
_5GSTrackingAreaIdentity
last_visited_registered_tai_tmp
=
{};
decoded_size
+=
last_visited_registered_tai_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
if
((
decoded_result
=
last_visited_registered_tai_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
{
return
KEncodeDecodeError
;
}
decoded_size
+=
decoded_result
;
ie_last_visited_registered_TAI
=
std
::
optional
<
_5GSTrackingAreaIdentity
>
(
last_visited_registered_tai_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
0x17
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI
(0x17)"
);
case
kIeiUeNetworkCapability
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI
0x%x"
,
kIeiUeNetworkCapability
);
UENetworkCapability
ie_s1_ue_network_capability_tmp
=
{};
decoded_size
+=
ie_s1_ue_network_capability_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
if
((
decoded_result
=
ie_s1_ue_network_capability_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
{
return
KEncodeDecodeError
;
}
decoded_size
+=
decoded_result
;
ie_s1_ue_network_capability
=
std
::
optional
<
UENetworkCapability
>
(
ie_s1_ue_network_capability_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
kIeiUplinkDataStatus
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI
(0x40)"
);
Logger
::
nas_mm
().
debug
(
"Decoding IEI
0x%x"
,
kIeiUplinkDataStatus
);
UplinkDataStatus
ie_uplink_data_status_tmp
=
{};
decoded_size
+=
ie_uplink_data_status_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
if
((
decoded_result
=
ie_uplink_data_status_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
{
return
KEncodeDecodeError
;
}
decoded_size
+=
decoded_result
;
ie_uplink_data_status
=
std
::
optional
<
UplinkDataStatus
>
(
ie_uplink_data_status_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
kIeiPduSessionStatus
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiPduSessionStatus
);
PDUSessionStatus
ie_PDU_session_status_tmp
;
decoded_size
+=
ie_PDU_session_status_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
PDUSessionStatus
ie_PDU_session_status_tmp
=
{};
if
((
decoded_result
=
ie_PDU_session_status_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
{
return
KEncodeDecodeError
;
}
decoded_size
+=
decoded_result
;
ie_PDU_session_status
=
std
::
optional
<
PDUSessionStatus
>
(
ie_PDU_session_status_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
kIeiUeStatus
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI
(0x2B)"
);
Logger
::
nas_mm
().
debug
(
"Decoding IEI
0x%x"
,
kIeiUeStatus
);
UEStatus
ie_ue_status_tmp
=
{};
decoded_size
+=
ie_ue_status_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
if
((
decoded_result
=
ie_ue_status_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
{
return
KEncodeDecodeError
;
}
decoded_size
+=
decoded_result
;
ie_ue_status
=
std
::
optional
<
UEStatus
>
(
ie_ue_status_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
0x77
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI
(0x77)"
);
case
kIei5gGuti
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI
0x%x"
,
kIei5gGuti
);
_5GSMobileIdentity
ie_additional_guti_tmp
=
{};
decoded_size
+=
ie_additional_guti_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
if
((
decoded_result
=
ie_additional_guti_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
{
return
KEncodeDecodeError
;
}
decoded_size
+=
decoded_result
;
ie_additional_guti
=
std
::
optional
<
_5GSMobileIdentity
>
(
ie_additional_guti_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
0x25
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI(0x25)"
);
case
kIeiAllowedPduSessionStatus
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiAllowedPduSessionStatus
);
AllowedPDUSessionStatus
ie_allowed_PDU_session_status_tmp
=
{};
decoded_size
+=
ie_allowed_PDU_session_status_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
if
((
decoded_result
=
ie_allowed_PDU_session_status_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
{
return
KEncodeDecodeError
;
}
decoded_size
+=
decoded_result
;
ie_allowed_PDU_session_status
=
std
::
optional
<
AllowedPDUSessionStatus
>
(
ie_allowed_PDU_session_status_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
kIeiUeUsageSetting
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiUeUsageSetting
);
UEUsageSetting
ie_ues_usage_setting_tmp
=
{};
decoded_size
+=
ie_ues_usage_setting_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
if
((
decoded_result
=
ie_ues_usage_setting_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
{
return
KEncodeDecodeError
;
}
decoded_size
+=
decoded_result
;
ie_ues_usage_setting
=
std
::
optional
<
UEUsageSetting
>
(
ie_ues_usage_setting_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
kIei5gsDrxParameters
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x
51: 5GS DRX Parameters"
);
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x
%x"
,
kIei5gsDrxParameters
);
_5GS_DRX_Parameters
ie_5gs_drx_parameters_tmp
=
{};
decoded_size
+=
ie_5gs_drx_parameters_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
if
((
decoded_result
=
ie_5gs_drx_parameters_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
{
return
KEncodeDecodeError
;
}
decoded_size
+=
decoded_result
;
ie_5gs_drx_parameters
=
std
::
optional
<
_5GS_DRX_Parameters
>
(
ie_5gs_drx_parameters_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
kIeiEpsNasMessageContainer
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x
70: EPS NAS Message Container "
);
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x
%x"
,
kIeiEpsNasMessageContainer
);
EPS_NAS_Message_Container
ie_eps_nas_message_container_tmp
=
{};
decoded_size
+=
ie_eps_nas_message_container_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
if
((
decoded_result
=
ie_eps_nas_message_container_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
{
return
KEncodeDecodeError
;
}
decoded_size
+=
decoded_result
;
ie_eps_nas_message_container
=
std
::
optional
<
EPS_NAS_Message_Container
>
(
ie_eps_nas_message_container_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
0x74
:
{
// TODO: verify IEI value (spec Ox79)
Logger
::
nas_mm
().
debug
(
"Decoding IEI
(0x74)"
);
case
kIeiLadnIndication
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI
0x%x"
,
kIeiLadnIndication
);
LadnIndication
ie_ladn_indication_tmp
=
{};
decoded_size
+=
ie_ladn_indication_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
if
((
decoded_result
=
ie_ladn_indication_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
{
return
KEncodeDecodeError
;
}
decoded_size
+=
decoded_result
;
ie_ladn_indication
=
std
::
optional
<
LadnIndication
>
(
ie_ladn_indication_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
kIeiPayloadContainer
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x
7B: Payload Container"
);
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x
%x"
,
kIeiPayloadContainer
);
Payload_Container
ie_payload_container_tmp
=
{};
decoded_size
+=
ie_payload_container_tmp
.
Decode
(
// TODO: verified type of Payload container
if
((
decoded_result
=
ie_payload_container_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
,
N1_SM_INFORMATION
);
// TODO: verified type of Payload container
N1_SM_INFORMATION
))
==
KEncodeDecodeError
)
{
return
KEncodeDecodeError
;
}
decoded_size
+=
decoded_result
;
ie_payload_container
=
std
::
optional
<
Payload_Container
>
(
ie_payload_container_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
0x53
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI
(0x53)"
);
Logger
::
nas_mm
().
debug
(
"Decoding IEI
0x%x"
,
kIei5gsUpdateType
);
_5gsUpdateType
ie_5gs_update_type_tmp
=
{};
decoded_size
+=
ie_5gs_update_type_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
if
((
decoded_result
=
ie_5gs_update_type_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
{
return
KEncodeDecodeError
;
}
decoded_size
+=
decoded_result
;
ie_5gs_update_type
=
std
::
optional
<
_5gsUpdateType
>
(
ie_5gs_update_type_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
0x71
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI
(0x71)"
);
case
kIeiNasMessageContainer
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI
0x%x"
,
kIeiNasMessageContainer
);
NasMessageContainer
ie_nas_message_container_tmp
=
{};
decoded_size
+=
ie_nas_message_container_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
if
((
decoded_result
=
ie_nas_message_container_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
{
return
KEncodeDecodeError
;
}
decoded_size
+=
decoded_result
;
ie_nas_message_container
=
std
::
optional
<
NasMessageContainer
>
(
ie_nas_message_container_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
0x60
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI
(0x71)"
);
case
kIeiEpsBearerContextStatus
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI
0x%x"
,
kIeiEpsBearerContextStatus
);
EpsBearerContextStatus
ie_eps_bearer_context_status_tmp
=
{};
decoded_size
+=
ie_eps_bearer_context_status_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
if
((
decoded_result
=
ie_eps_bearer_context_status_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
KEncodeDecodeError
)
{
return
KEncodeDecodeError
;
}
decoded_size
+=
decoded_result
;
ie_eps_bearer_context_status
=
std
::
optional
<
EpsBearerContextStatus
>
(
ie_eps_bearer_context_status_tmp
);
octet
=
*
(
buf
+
decoded_size
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
...
...
@@ -1142,5 +1278,5 @@ int RegistrationRequest::Decode(uint8_t* buf, int len) {
}
Logger
::
nas_mm
().
debug
(
"Decoded RegistrationRequest message (len %d)"
,
decoded_size
);
return
1
;
return
decoded_size
;
}
src/nas/msgs/RegistrationRequest.hpp
View file @
66bee1a7
...
...
@@ -25,8 +25,6 @@
#include "NasIeHeader.hpp"
#include <bstrlib.h>
#include <stdint.h>
#include <string>
#include <vector>
using
namespace
std
;
...
...
@@ -42,108 +40,110 @@ class RegistrationRequest : public NasMmPlainHeader {
void
SetHeader
(
uint8_t
security_header_type
);
void
GetSecurityHeaderType
(
uint8_t
security_header_type
);
bool
v
erifyHeader
();
bool
V
erifyHeader
();
void
s
et5gsRegistrationType
(
bool
is_for
,
uint8_t
type
);
bool
get5gsRegistrationType
(
bool
&
is_for
,
uint8_t
&
reg_type
/*3bits*/
);
void
S
et5gsRegistrationType
(
bool
is_for
,
uint8_t
type
);
bool
Get5gsRegistrationType
(
bool
&
is_for
,
uint8_t
&
reg_type
);
void
SetNgKsi
(
uint8_t
tsc
,
uint8_t
key_set_id
);
bool
getngKSI
(
uint8_t
&
ng_ksi
)
;
bool
GetNgKsi
(
uint8_t
&
ng_ksi
)
const
;
uint8_t
getMobileIdentityType
()
;
uint8_t
GetMobileIdentityType
()
const
;
// TODO: SetMobileIdentityType(uint8_t);
void
SetSuciSupiFormatImsi
(
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
uint8_t
protection_sch_id
,
const
string
msin
);
const
std
::
string
&
mcc
,
const
std
::
string
&
mnc
,
const
std
::
string
&
routing_ind
,
uint8_t
protection_sch_id
,
const
std
::
string
&
msin
);
void
SetSuciSupiFormatImsi
(
const
string
mcc
,
const
string
mnc
,
const
string
routingInd
,
uint8_t
protection_sch_id
,
uint8_t
hnpki
,
const
string
msin
);
bool
getSuciSupiFormatImsi
(
nas
::
SUCI_imsi_t
&
imsi
);
const
std
::
string
&
mcc
,
const
std
::
string
&
mnc
,
const
std
::
string
&
routing_ind
,
uint8_t
protection_sch_id
,
uint8_t
hnpki
,
const
std
::
string
&
msin
);
bool
GetSuciSupiFormatImsi
(
nas
::
SUCI_imsi_t
&
imsi
)
const
;
void
Set5gGuti
();
std
::
string
Get5gGuti
();
std
::
string
Get5gGuti
()
const
;
void
SetImeiImeisv
();
void
Set5gSTmsi
();
void
setAdditional_GUTI_SUCI_SUPI_format_IMSI
(
const
st
ring
mcc
,
const
string
mnc
,
uint8_t
amf_region_id
,
uint8_t
amf_set_id
,
uint8_t
amf_pointer
,
const
st
ring
_5g_tmsi
);
bool
getAdditionalGuti
(
nas
::
_5G_GUTI_t
&
guti
)
;
void
SetAdditionalGuti
(
const
st
d
::
string
&
mcc
,
const
std
::
string
&
mnc
,
uint8_t
amf_region_id
,
uint8_t
amf_set_id
,
uint8_t
amf_pointer
,
const
st
d
::
string
&
_5g_tmsi
);
bool
GetAdditionalGuti
(
nas
::
_5G_GUTI_t
&
guti
)
const
;
void
s
etNonCurrentNativeNasKSI
(
uint8_t
tsc
,
uint8_t
key_set_id
);
bool
g
etNonCurrentNativeNasKSI
(
uint8_t
&
value
)
const
;
void
S
etNonCurrentNativeNasKSI
(
uint8_t
tsc
,
uint8_t
key_set_id
);
bool
G
etNonCurrentNativeNasKSI
(
uint8_t
&
value
)
const
;
void
set5GMM
Capability
(
uint8_t
value
);
bool
get5GMMCapability
(
uint8_t
&
value
)
;
void
Set5gmm
Capability
(
uint8_t
value
);
bool
Get5gmmCapability
(
uint8_t
&
value
)
const
;
void
setUESecurityCapability
(
uint8_t
g_EASel
,
uint8_t
g_IASel
);
void
setUE
SecurityCapability
(
uint8_t
g_EASel
,
uint8_t
g_IASel
,
uint8_t
eea
,
uint8_t
eia
);
bool
getUeSecurityCapability
(
uint8_t
&
ea
,
uint8_t
&
ia
)
;
void
SetUeSecurityCapability
(
uint8_t
ea
,
uint8_t
ia
);
void
SetUe
SecurityCapability
(
uint8_t
ea
,
uint8_t
ia
,
uint8_t
eea
,
uint8_t
eia
);
bool
GetUeSecurityCapability
(
uint8_t
&
ea
,
uint8_t
&
ia
)
const
;
// TODO: use std::optional for optional fields eea,eia
bool
g
etUeSecurityCapability
(
uint8_t
&
ea
,
uint8_t
&
ia
,
uint8_t
&
eea
,
uint8_t
&
eia
);
bool
G
etUeSecurityCapability
(
uint8_t
&
ea
,
uint8_t
&
ia
,
uint8_t
&
eea
,
uint8_t
&
eia
)
const
;
void
setRequestedNSSAI
(
std
::
vector
<
struct
SNSSAI_s
>
nssai
);
bool
getRequestedNssai
(
std
::
vector
<
struct
SNSSAI_s
>&
nssai
)
;
void
SetRequestedNssai
(
const
std
::
vector
<
struct
SNSSAI_s
>&
nssai
);
bool
GetRequestedNssai
(
std
::
vector
<
struct
SNSSAI_s
>&
nssai
)
const
;
void
setUENetworkCapability
(
uint8_t
g_EEASel
,
uint8_t
g_EIASel
);
bool
getS1UeNetworkCapability
(
uint8_t
&
eea
,
uint8_t
&
eia
)
;
void
SetUeNetworkCapability
(
uint8_t
eea
,
uint8_t
eia
);
bool
GetS1UeNetworkCapability
(
uint8_t
&
eea
,
uint8_t
&
eia
)
const
;
void
setUplinkDataStatus
(
const
uint16_t
&
value
);
bool
getUplinkDataStatus
(
uint16_t
&
value
)
;
void
SetUplinkDataStatus
(
uint16_t
value
);
bool
GetUplinkDataStatus
(
uint16_t
&
value
)
const
;
void
setLastVisitedRegisteredTAI
(
const
std
::
string
&
mcc
,
const
std
::
string
mnc
,
const
uint32_t
&
tac
);
void
SetLastVisitedRegisteredTai
(
const
std
::
string
&
mcc
,
const
std
::
string
&
mnc
,
uint32_t
tac
);
// TODO: Getter
void
setPDU
SessionStatus
(
uint16_t
value
);
uint16_t
getPduSessionStatus
()
;
void
SetPdu
SessionStatus
(
uint16_t
value
);
uint16_t
GetPduSessionStatus
()
const
;
void
setMICO
Indication
(
bool
sprti
,
bool
raai
);
bool
getMicoIndication
(
uint8_t
&
sprti
,
uint8_t
&
raai
)
;
void
SetMico
Indication
(
bool
sprti
,
bool
raai
);
bool
GetMicoIndication
(
uint8_t
&
sprti
,
uint8_t
&
raai
)
const
;
void
setUE
Status
(
bool
n1
,
bool
s1
);
bool
getUeStatus
(
uint8_t
&
n1ModeReg
,
uint8_t
&
s1ModeReg
)
;
void
SetUe
Status
(
bool
n1
,
bool
s1
);
bool
GetUeStatus
(
uint8_t
&
n1_mode
,
uint8_t
&
s1_mode
)
const
;
void
setAllowedPDU
SessionStatus
(
uint16_t
value
);
uint16_t
getAllowedPduSessionStatus
()
;
void
SetAllowedPdu
SessionStatus
(
uint16_t
value
);
uint16_t
GetAllowedPduSessionStatus
()
const
;
void
setUES_Usage_
Setting
(
bool
ues_usage_setting
);
uint8_t
getUEsUsageSetting
()
;
void
SetUeUsage
Setting
(
bool
ues_usage_setting
);
uint8_t
GetUeUsageSetting
()
const
;
void
Set5gsDrxParameters
(
uint8_t
value
);
uint8_t
get5GSDrxParameters
()
;
uint8_t
Get5gsDrxParameters
()
const
;
void
setEPS_NAS_Message_Container
(
bstring
value
);
void
SetEpsNasMessageContainer
(
const
bstring
&
value
);
void
setLADN_Indication
(
std
::
vector
<
bstring
>
ladnV
alue
);
bool
getLadnIndication
(
std
::
vector
<
bstring
>&
ladnValue
)
;
void
SetLadnIndication
(
const
std
::
vector
<
bstring
>&
ladn_v
alue
);
bool
GetLadnIndication
(
std
::
vector
<
bstring
>&
ladn_value
)
const
;
void
SetPayloadContainerType
(
uint8_t
value
);
uint8_t
GetPayloadContainerType
();
uint8_t
GetPayloadContainerType
()
const
;
void
SetPayloadContainer
(
std
::
vector
<
PayloadContainerEntry
>
content
);
bool
GetPayloadContainer
(
std
::
vector
<
PayloadContainerEntry
>&
content
);
void
SetPayloadContainer
(
const
std
::
vector
<
PayloadContainerEntry
>&
content
);
bool
GetPayloadContainer
(
std
::
vector
<
PayloadContainerEntry
>&
content
)
const
;
void
SetNetworkSlicingIndication
(
bool
dcni
,
bool
nssci
);
bool
getNetworkSlicingIndication
(
uint8_t
&
dcni
,
uint8_t
&
nssci
)
;
bool
GetNetworkSlicingIndication
(
uint8_t
&
dcni
,
uint8_t
&
nssci
)
const
;
void
set_5GS_Update_
Type
(
void
Set5gsUpdate
Type
(
uint8_t
eps_pnb_ciot
,
uint8_t
_5gs_pnb_ciot
,
bool
ng_ran
,
bool
sms
);
bool
get5GS
UpdateType
(
bool
Get5gs
UpdateType
(
uint8_t
&
eps_pnb_ciot
,
uint8_t
&
_5gs_pnb_ciot
,
bool
&
ng_ran_rcu
,
bool
&
sms_requested
);
bool
&
sms_requested
)
const
;
void
SetNasMessageContainer
(
bstring
value
);
bool
GetNasMessageContainer
(
bstring
&
nas
);
void
SetNasMessageContainer
(
const
bstring
&
value
);
bool
GetNasMessageContainer
(
bstring
&
nas
)
const
;
bool
getEpsNasMessageContainer
(
bstring
&
epsNas
)
;
// bool
g
etEpsNasMessageContainer(bstring& epsNas);
bool
GetEpsNasMessageContainer
(
bstring
&
epsNas
)
const
;
// bool
G
etEpsNasMessageContainer(bstring& epsNas);
void
SetEpsBearerContextsStatus
(
uint16_t
value
);
bool
getEpsBearerContextStatus
(
uint16_t
&
value
)
;
bool
GetEpsBearerContextStatus
(
uint16_t
&
value
)
const
;
public:
_5GSRegistrationType
ie_5gs_registration_type
;
// Mandatory
...
...
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