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
99a1fc56
Commit
99a1fc56
authored
Oct 15, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First version for Mobility Registration Update
parent
632c3bb9
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
189 additions
and
199 deletions
+189
-199
src/amf-app/amf_app.cpp
src/amf-app/amf_app.cpp
+11
-7
src/amf-app/amf_app.hpp
src/amf-app/amf_app.hpp
+3
-0
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+166
-191
src/amf-app/amf_n1.hpp
src/amf-app/amf_n1.hpp
+7
-1
src/contexts/ue_context.cpp
src/contexts/ue_context.cpp
+1
-0
src/contexts/ue_context.hpp
src/contexts/ue_context.hpp
+1
-0
No files found.
src/amf-app/amf_app.cpp
View file @
99a1fc56
...
...
@@ -58,7 +58,6 @@ extern amf_config amf_cfg;
extern
statistics
stacs
;
void
amf_app_task
(
void
*
);
uint32_t
golbal_tmsi
=
1
;
//------------------------------------------------------------------------------
amf_app
::
amf_app
(
const
amf_config
&
amf_cfg
)
...
...
@@ -394,6 +393,11 @@ void amf_app::handle_post_sm_context_response_error_400() {
Logger
::
amf_app
().
error
(
"Post SM context response error 400"
);
}
//------------------------------------------------------------------------------
uint32_t
amf_app
::
generate_tmsi
()
{
return
tmsi_generator
.
get_uid
();
}
//------------------------------------------------------------------------------
bool
amf_app
::
generate_5g_guti
(
uint32_t
ranid
,
long
amfid
,
string
&
mcc
,
string
&
mnc
,
uint32_t
&
tmsi
)
{
...
...
@@ -404,12 +408,12 @@ bool amf_app::generate_5g_guti(
"No UE context for ran_amf_id %s, exit"
,
ue_context_key
.
c_str
());
return
false
;
}
std
::
shared_ptr
<
ue_context
>
uc
;
uc
=
ran_amf_id_2_ue_context
(
ue_context_key
);
mcc
=
uc
.
get
()
->
tai
.
mcc
;
mnc
=
uc
.
get
()
->
tai
.
mnc
;
tmsi
=
golbal_tmsi
;
golbal_tmsi
++
;
std
::
shared_ptr
<
ue_context
>
uc
=
{}
;
uc
=
ran_amf_id_2_ue_context
(
ue_context_key
);
mcc
=
uc
.
get
()
->
tai
.
mcc
;
mnc
=
uc
.
get
()
->
tai
.
mnc
;
tmsi
=
generate_tmsi
()
;
uc
.
get
()
->
tmsi
=
tmsi
;
return
true
;
}
...
...
src/amf-app/amf_app.hpp
View file @
99a1fc56
...
...
@@ -70,6 +70,8 @@ class amf_app {
mutable
std
::
shared_mutex
m_amf_event_subscriptions
;
util
::
uint_generator
<
uint32_t
>
tmsi_generator
;
public:
explicit
amf_app
(
const
amf_config
&
amf_cfg
);
amf_app
(
amf_app
const
&
)
=
delete
;
...
...
@@ -107,6 +109,7 @@ class amf_app {
// SMF Client response handlers
void
handle_post_sm_context_response_error_400
();
// others
uint32_t
generate_tmsi
();
bool
generate_5g_guti
(
uint32_t
ranid
,
long
amfid
,
std
::
string
&
mcc
,
std
::
string
&
mnc
,
uint32_t
&
tmsi
);
...
...
src/amf-app/amf_n1.cpp
View file @
99a1fc56
This diff is collapsed.
Click to expand it.
src/amf-app/amf_n1.hpp
View file @
99a1fc56
...
...
@@ -45,6 +45,7 @@
#include "nas_context.hpp"
#include "pdu_session_context.hpp"
#include "amf_event.hpp"
#include "RegistrationAccept.hpp"
namespace
amf_application
{
...
...
@@ -102,7 +103,6 @@ class amf_n1 {
// procedures
// specific procedures running logic
void
run_registration_procedure
(
std
::
shared_ptr
<
nas_context
>&
nc
);
void
run_initial_registration_procedure
();
void
run_mobility_registration_update_procedure
(
std
::
shared_ptr
<
nas_context
>
nc
,
uint16_t
uplink_data_status
,
uint16_t
pdu_session_status
);
...
...
@@ -164,6 +164,12 @@ class amf_n1 {
void
handle_ue_reachability_status_change
(
std
::
string
supi
,
uint8_t
http_version
);
void
get_pdu_session_to_be_activated
(
uint16_t
pdu_session_status
,
std
::
vector
<
uint8_t
>&
pdu_session_to_be_activated
);
void
initialize_registration_accept
(
std
::
shared_ptr
<
nas
::
RegistrationAccept
>&
registration_accept
);
private:
void
ue_initiate_de_registration_handle
(
uint32_t
ran_ue_ngap_id
,
long
amf_ue_ngap_id
,
bstring
nas
);
...
...
src/contexts/ue_context.cpp
View file @
99a1fc56
...
...
@@ -30,6 +30,7 @@ ue_context::ue_context() {
cgi
=
{};
tai
=
{};
pdu_sessions
=
{};
tmsi
=
0
;
}
//------------------------------------------------------------------------------
...
...
src/contexts/ue_context.hpp
View file @
99a1fc56
...
...
@@ -68,6 +68,7 @@ class ue_context {
NrCgi_t
cgi
;
Tai_t
tai
;
std
::
string
supi
;
uint32_t
tmsi
;
// pdu session id <-> pdu_session_contex: map stores all pdu sessions for this
// UE
std
::
map
<
std
::
uint8_t
,
std
::
shared_ptr
<
pdu_session_context
>>
pdu_sessions
;
...
...
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