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
e0d5966d
Commit
e0d5966d
authored
Mar 29, 2023
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable LADN Info, GPRS Timer 2 in Registration Accept
parent
28bf3fa1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
41 deletions
+56
-41
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+7
-0
src/nas/msgs/RegistrationAccept.cpp
src/nas/msgs/RegistrationAccept.cpp
+48
-41
src/nas/msgs/RegistrationAccept.hpp
src/nas/msgs/RegistrationAccept.hpp
+1
-0
No files found.
src/amf-app/amf_n1.cpp
View file @
e0d5966d
...
@@ -4555,6 +4555,13 @@ void amf_n1::initialize_registration_accept(
...
@@ -4555,6 +4555,13 @@ void amf_n1::initialize_registration_accept(
// Timer T3512
// Timer T3512
registration_accept
->
SetT3512Value
(
0x5
,
T3512_TIMER_VALUE_MIN
);
registration_accept
->
SetT3512Value
(
0x5
,
T3512_TIMER_VALUE_MIN
);
// Timer T3502
registration_accept
->
SetT3502Value
(
12
);
// TODO: remove hardcoded value
// LADN info
LadnInformation
ladn_information
=
{};
registration_accept
->
SetLadnInformation
(
ladn_information
);
// Find UE Context
// Find UE Context
std
::
shared_ptr
<
ue_context
>
uc
=
{};
std
::
shared_ptr
<
ue_context
>
uc
=
{};
if
(
!
find_ue_context
(
nc
->
ran_ue_ngap_id
,
nc
->
amf_ue_ngap_id
,
uc
))
{
if
(
!
find_ue_context
(
nc
->
ran_ue_ngap_id
,
nc
->
amf_ue_ngap_id
,
uc
))
{
...
...
src/nas/msgs/RegistrationAccept.cpp
View file @
e0d5966d
...
@@ -37,25 +37,25 @@ RegistrationAccept::RegistrationAccept()
...
@@ -37,25 +37,25 @@ RegistrationAccept::RegistrationAccept()
ie_pdu_session_status
=
std
::
nullopt
;
ie_pdu_session_status
=
std
::
nullopt
;
ie_pdu_session_reactivation_result
=
std
::
nullopt
;
ie_pdu_session_reactivation_result
=
std
::
nullopt
;
ie_pdu_session_reactivation_result_error_cause
=
std
::
nullopt
;
ie_pdu_session_reactivation_result_error_cause
=
std
::
nullopt
;
// ie_ladn_information
= std::nullopt;
ie_ladn_information
=
std
::
nullopt
;
ie_mico_indication
=
std
::
nullopt
;
ie_mico_indication
=
std
::
nullopt
;
ie_network_slicing_indication
=
std
::
nullopt
;
ie_network_slicing_indication
=
std
::
nullopt
;
ie_t3512_value
=
std
::
nullopt
;
ie_t3512_value
=
std
::
nullopt
;
ie_non_3gpp_deregistration_timer_value
=
std
::
nullopt
;
ie_non_3gpp_deregistration_timer_value
=
std
::
nullopt
;
ie_t3502_value
=
std
::
nullopt
;
ie_t3502_value
=
std
::
nullopt
;
ie_sor_transparent_container
=
std
::
nullopt
;
ie_sor_transparent_container
=
std
::
nullopt
;
ie_eap_message
=
std
::
nullopt
;
ie_eap_message
=
std
::
nullopt
;
ie_nssai_inclusion_mode
=
std
::
nullopt
;
ie_nssai_inclusion_mode
=
std
::
nullopt
;
ie_negotiated_drx_parameters
=
std
::
nullopt
;
ie_negotiated_drx_parameters
=
std
::
nullopt
;
ie_non_3gpp_nw_policies
=
std
::
nullopt
;
ie_non_3gpp_nw_policies
=
std
::
nullopt
;
ie_eps_bearer_context_status
=
std
::
nullopt
;
ie_eps_bearer_context_status
=
std
::
nullopt
;
ie_extended_drx_parameters
=
std
::
nullopt
;
ie_extended_drx_parameters
=
std
::
nullopt
;
ie_t3447_value
=
std
::
nullopt
;
ie_t3447_value
=
std
::
nullopt
;
ie_t3448_value
=
std
::
nullopt
;
ie_t3448_value
=
std
::
nullopt
;
ie_t3324_value
=
std
::
nullopt
;
ie_t3324_value
=
std
::
nullopt
;
ie_ue_radio_capability_id
=
std
::
nullopt
;
ie_ue_radio_capability_id
=
std
::
nullopt
;
ie_pending_nssai
=
std
::
nullopt
;
ie_pending_nssai
=
std
::
nullopt
;
ie_tai_list
=
std
::
nullopt
;
ie_tai_list
=
std
::
nullopt
;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
...
@@ -184,12 +184,11 @@ void RegistrationAccept::SetMicoIndication(bool sprti, bool raai) {
...
@@ -184,12 +184,11 @@ void RegistrationAccept::SetMicoIndication(bool sprti, bool raai) {
ie_mico_indication
=
std
::
make_optional
<
MicoIndication
>
(
sprti
,
raai
);
ie_mico_indication
=
std
::
make_optional
<
MicoIndication
>
(
sprti
,
raai
);
}
}
/*
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void RegistrationAccept::setLADN_Information(std::vector<bstring> ladnValue) {
void
RegistrationAccept
::
SetLadnInformation
(
ie_ladn_information = std::make_optional<LadnInformation>(ladnValue);
const
LadnInformation
&
ladn_information
)
{
ie_ladn_information
=
std
::
make_optional
<
LadnInformation
>
(
ladn_information
);
}
}
*/
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
RegistrationAccept
::
SetNetworkSlicingIndication
(
bool
dcni
,
bool
nssci
)
{
void
RegistrationAccept
::
SetNetworkSlicingIndication
(
bool
dcni
,
bool
nssci
)
{
...
@@ -466,18 +465,20 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
...
@@ -466,18 +465,20 @@ int RegistrationAccept::Encode(uint8_t* buf, int len) {
return
KEncodeDecodeError
;
return
KEncodeDecodeError
;
}
}
}
}
/*
if
(
!
ie_ladn_information
.
has_value
())
{
if
(
!
ie_ladn_information
.
has_value
())
{
Logger
::
nas_mm
().
warn
(
"IE ie_ladn_information is not available"
);
Logger
::
nas_mm
().
warn
(
"IE ie_ladn_information is not available"
);
}
else
{
}
else
{
if (int size = ie_ladn_information.value().Encode(
int
size
=
ie_ladn_information
.
value
().
Encode
(
buf + encoded_size, len - encoded_size)) {
buf
+
encoded_size
,
len
-
encoded_size
);
if
(
size
!=
KEncodeDecodeError
)
{
encoded_size
+=
size
;
encoded_size
+=
size
;
}
else
{
}
else
{
Logger::nas_mm().error("encoding ie_ladn_information error");
Logger
::
nas_mm
().
error
(
return 0;
"Encoding %s error"
,
LadnInformation
::
GetIeName
().
c_str
());
return
KEncodeDecodeError
;
}
}
}
*/
}
if
(
!
ie_mico_indication
.
has_value
())
{
if
(
!
ie_mico_indication
.
has_value
())
{
Logger
::
nas_mm
().
debug
(
Logger
::
nas_mm
().
debug
(
...
@@ -994,18 +995,24 @@ int RegistrationAccept::Decode(uint8_t* buf, int len) {
...
@@ -994,18 +995,24 @@ int RegistrationAccept::Decode(uint8_t* buf, int len) {
ie_pdu_session_reactivation_result_error_cause_tmp
);
ie_pdu_session_reactivation_result_error_cause_tmp
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
/*
}
break
;
case kIeiLadnInformation: {
case
kIeiLadnInformation
:
{
Logger::nas_mm().debug("Decoding IEI(0x74)");
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiLadnInformation
);
LadnInformation ie_ladn_information_tmp = {};
LadnInformation
ie_ladn_information_tmp
=
{};
decoded_size += ie_ladn_information_tmp.Decode(
if
((
decoded_result
=
ie_ladn_information_tmp
.
Decode
(
buf + decoded_size, len - decoded_size, true);
buf
+
decoded_size
,
len
-
decoded_size
,
true
))
==
ie_ladn_information =
KEncodeDecodeError
)
{
std::optional<LadnInformation>(ie_ladn_information_tmp);
Logger
::
nas_mm
().
error
(
octet = *(buf + decoded_size);
"Decoding %s error"
,
LadnInformation
::
GetIeName
().
c_str
());
Logger::nas_mm().debug("Next IEI 0x%x", octet);
return
KEncodeDecodeError
;
} break;
}
*/
decoded_size
+=
decoded_result
;
ie_ladn_information
=
std
::
optional
<
LadnInformation
>
(
ie_ladn_information_tmp
);
DECODE_U8_VALUE
(
buf
+
decoded_size
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI 0x%x"
,
octet
);
}
break
;
case
kIeiGprsTimer3T3512
:
{
case
kIeiGprsTimer3T3512
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiGprsTimer3T3512
);
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiGprsTimer3T3512
);
GprsTimer3
ie_t3512_value_tmp
(
kIeiGprsTimer3T3512
);
GprsTimer3
ie_t3512_value_tmp
(
kIeiGprsTimer3T3512
);
...
...
src/nas/msgs/RegistrationAccept.hpp
View file @
e0d5966d
...
@@ -89,6 +89,7 @@ class RegistrationAccept : public NasMmPlainHeader {
...
@@ -89,6 +89,7 @@ class RegistrationAccept : public NasMmPlainHeader {
// TODO: Get
// TODO: Get
// TODO: LADN information
// TODO: LADN information
void
SetLadnInformation
(
const
LadnInformation
&
ladn_information
);
void
SetMicoIndication
(
bool
sprti
,
bool
raai
);
void
SetMicoIndication
(
bool
sprti
,
bool
raai
);
// TODO: Get
// TODO: Get
...
...
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