Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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-SMF
Commits
5b21c545
Commit
5b21c545
authored
Jul 07, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send NF registration after initiating HTTP server
parent
787c2036
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
9 deletions
+23
-9
src/oai_smf/main.cpp
src/oai_smf/main.cpp
+3
-0
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+13
-9
src/smf_app/smf_app.hpp
src/smf_app/smf_app.hpp
+7
-0
No files found.
src/oai_smf/main.cpp
View file @
5b21c545
...
...
@@ -150,6 +150,9 @@ int main(int argc, char** argv) {
smf_http1_manager
.
join
();
smf_http2_manager
.
join
();
// Register to NRF and discover appropriate UPFs
smf_app_inst
->
start_nf_registration_discovery
();
FILE
*
fp
=
NULL
;
std
::
string
filename
=
fmt
::
format
(
"/tmp/smf_{}.status"
,
getpid
());
fp
=
fopen
(
filename
.
c_str
(),
"w+"
);
...
...
src/smf_app/smf_app.cpp
View file @
5b21c545
...
...
@@ -341,6 +341,19 @@ smf_app::smf_app(const std::string& config_file)
throw
;
}
Logger
::
smf_app
().
startup
(
"Started"
);
}
//------------------------------------------------------------------------------
smf_app
::~
smf_app
()
{
Logger
::
smf_app
().
debug
(
"Delete SMF_APP instance..."
);
// TODO: Unregister NRF
if
(
smf_n4_inst
)
delete
smf_n4_inst
;
if
(
smf_sbi_inst
)
delete
smf_sbi_inst
;
}
//------------------------------------------------------------------------------
void
smf_app
::
start_nf_registration_discovery
()
{
if
(
smf_cfg
.
discover_upf
)
{
// Trigger NFStatusNotify subscription to be noticed when a new UPF becomes
// available (if this option is enabled)
...
...
@@ -360,17 +373,8 @@ smf_app::smf_app(const std::string& config_file)
usleep
(
microsecond
);
register_to_nrf
();
}
Logger
::
smf_app
().
startup
(
"Started"
);
}
//------------------------------------------------------------------------------
smf_app
::~
smf_app
()
{
Logger
::
smf_app
().
debug
(
"Delete SMF_APP instance..."
);
// TODO: Unregister NRF
if
(
smf_n4_inst
)
delete
smf_n4_inst
;
if
(
smf_sbi_inst
)
delete
smf_sbi_inst
;
}
//------------------------------------------------------------------------------
void
smf_app
::
start_upf_association
(
const
pfcp
::
node_id_t
&
node_id
)
{
std
::
time_t
time_epoch
=
std
::
time
(
nullptr
);
...
...
src/smf_app/smf_app.hpp
View file @
5b21c545
...
...
@@ -665,6 +665,13 @@ class smf_app {
void
start_upf_association
(
const
pfcp
::
node_id_t
&
node_id
,
const
upf_profile
&
profile
);
/*
* To start NF registration with NRF and subscribe to UPF event notification
* @param void
* @return void
*/
void
start_nf_registration_discovery
();
/*
* To store a promise of a PDU Session Create SM Contex Response to be
* triggered when the result is ready
...
...
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