Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AUSF
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-AUSF
Commits
27b2451a
Commit
27b2451a
authored
May 25, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor update for Ausf config
parent
d9138e8f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
57 deletions
+51
-57
etc/ausf.conf
etc/ausf.conf
+28
-31
src/ausf_app/ausf_config.cpp
src/ausf_app/ausf_config.cpp
+21
-25
src/ausf_app/ausf_config.hpp
src/ausf_app/ausf_config.hpp
+2
-1
No files found.
etc/ausf.conf
100755 → 100644
View file @
27b2451a
## AUSF configuration file
AUSF
=
{
INSTANCE_ID
=
10
;
#10
PID_DIRECTORY
=
"/var/run"
;
AUSF_NAME
=
"OAI-AUSF"
;
##AUSF configuration file AUSF = {INSTANCE_ID = 10;
# 10 PID_DIRECTORY = "/var/run";
AUSF_NAME
=
"OAI-AUSF"
;
#STATISTICS_TIMER_INTERVAL = 20; #second
INTERFACES
:{
# AUSF binded interface for SBI interface (e.g., communication with AMF, UDM)
SBI_AUSF
:{
INTERFACE_NAME
=
"eth0"
;
# YOUR NETWORK CONFIG HERE
IPV4_ADDRESS
=
"read"
;
PORT
=
80
;
# YOUR NETWORK CONFIG HERE (default: 80)
PPID
=
60
;
};
};
# UDM Information
UDM
:{
IPV4_ADDRESS
=
"192.168.66.8"
;
# YOUR NETWORK CONFIG HERE
PORT
=
80
;
# YOUR NETWORK CONFIG HERE (default: 80)
API_VERSION
=
"v1"
;
# YOUR AMF API VERSION FOR UDM CONFIG HERE
};
# AMF Information
AMF
:{
IPV4_ADDRESS
=
"192.168.66.2"
;
# YOUR NETWORK CONFIG HERE (default: 80)
PORT
=
80
;
# YOUR NETWORK CONFIG HERE (default: 80)
API_VERSION
=
"v1"
;
# YOUR AMF API VERSION FOR UDM CONFIG HERE
};
#STATISTICS_TIMER_INTERVAL = 20; #second
INTERFACES
: {
#AUSF binded interface for SBI interface(e.g., communication with AMF, UDM)
SBI
: {
INTERFACE_NAME
=
"eth0"
;
#YOUR NETWORK CONFIG HERE IPV4_ADDRESS = "read";
PORT
=
80
;
#YOUR NETWORK CONFIG HERE(default : 80) PPID = 60;
};
};
#UDM Information
UDM
: {
IPV4_ADDRESS
=
"192.168.66.8"
;
#YOUR NETWORK CONFIG HERE PORT = 80;
#YOUR NETWORK CONFIG HERE(default : 80) API_VERSION = "v1";
#YOUR AMF API VERSION FOR UDM CONFIG HERE
};
#AMF Information
AMF
: {
IPV4_ADDRESS
=
"192.168.66.2"
;
#YOUR NETWORK CONFIG HERE(default : 80) PORT = 80;
#YOUR NETWORK CONFIG HERE(default : 80) API_VERSION = "v1";
#YOUR AMF API VERSION FOR UDM CONFIG HERE
};
}
;
src/ausf_app/ausf_config.cpp
View file @
27b2451a
...
...
@@ -37,7 +37,6 @@
#include "string.hpp"
// C includes
#include <arpa/inet.h>
#include <stdbool.h>
#include <stdlib.h>
...
...
@@ -56,11 +55,14 @@ using namespace libconfig;
namespace
config
{
//------------------------------------------------------------------------------
ausf_config
::
ausf_config
()
{
ausf_config
::
ausf_config
()
:
sbi
()
{
udm_addr
.
ipv4_addr
.
s_addr
=
INADDR_ANY
;
udm_addr
.
port
=
80
;
udm_addr
.
api_version
=
"v1"
;
// TODO:
amf_addr
.
ipv4_addr
.
s_addr
=
INADDR_ANY
;
amf_addr
.
port
=
80
;
amf_addr
.
api_version
=
"v1"
;
}
//------------------------------------------------------------------------------
...
...
@@ -117,9 +119,8 @@ int ausf_config::load(const std::string& config_file) {
try
{
const
Setting
&
new_if_cfg
=
ausf_cfg
[
AUSF_CONFIG_STRING_INTERFACES
];
const
Setting
&
sbi_ausf_cfg
=
new_if_cfg
[
AUSF_CONFIG_STRING_INTERFACE_SBI_AUSF
];
load_interface
(
sbi_ausf_cfg
,
sbi
);
const
Setting
&
sbi_cfg
=
new_if_cfg
[
AUSF_CONFIG_STRING_INTERFACE_SBI
];
load_interface
(
sbi_cfg
,
sbi
);
}
catch
(
const
SettingNotFoundException
&
nfex
)
{
Logger
::
config
().
error
(
...
...
@@ -180,42 +181,37 @@ int ausf_config::load(const std::string& config_file) {
Logger
::
ausf_app
().
error
(
"%s : %s"
,
nfex
.
what
(),
nfex
.
getPath
());
return
RETURNerror
;
}
return
RETURNok
;
}
//------------------------------------------------------------------------------
void
ausf_config
::
display
()
{
Logger
::
config
().
info
(
"====================== AUSF ====================="
);
Logger
::
config
().
info
(
"======== AUSF ======="
);
Logger
::
config
().
info
(
"Configuration AUSF:"
);
Logger
::
config
().
info
(
"- Instance ...........................................: %d"
,
instance
);
Logger
::
config
().
info
(
"- PID dir ............................................: %s"
,
pid_dir
.
c_str
());
Logger
::
config
().
info
(
"- AUSF NAME............................................: %s"
,
ausf_name
.
c_str
());
Logger
::
config
().
info
(
"- Instance................: %d"
,
instance
);
Logger
::
config
().
info
(
"- PID dir.................: %s"
,
pid_dir
.
c_str
());
Logger
::
config
().
info
(
"- AUSF NAME...............: %s"
,
ausf_name
.
c_str
());
Logger
::
config
().
info
(
"- SBI Networking:"
);
Logger
::
config
().
info
(
"
i
face ................: %s"
,
sbi
.
if_name
.
c_str
());
Logger
::
config
().
info
(
"
ip
...................: %s"
,
inet_ntoa
(
sbi
.
addr4
));
Logger
::
config
().
info
(
"
p
ort .................: %d"
,
sbi
.
port
);
Logger
::
config
().
info
(
"
I
face ................: %s"
,
sbi
.
if_name
.
c_str
());
Logger
::
config
().
info
(
"
IP
...................: %s"
,
inet_ntoa
(
sbi
.
addr4
));
Logger
::
config
().
info
(
"
P
ort .................: %d"
,
sbi
.
port
);
Logger
::
config
().
info
(
"- UDM:"
);
Logger
::
config
().
info
(
" IPv4 Addr
...........: %s"
,
" IPv4 Addr
..
...........: %s"
,
inet_ntoa
(
*
((
struct
in_addr
*
)
&
udm_addr
.
ipv4_addr
)));
Logger
::
config
().
info
(
" Port
................: %lu "
,
udm_addr
.
port
);
Logger
::
config
().
info
(
" Port
..
................: %lu "
,
udm_addr
.
port
);
Logger
::
config
().
info
(
" API version
.........: %s"
,
udm_addr
.
api_version
.
c_str
());
" API version
..
.........: %s"
,
udm_addr
.
api_version
.
c_str
());
Logger
::
config
().
info
(
"- AMF:"
);
Logger
::
config
().
info
(
" IPv4 Addr
...........: %s"
,
" IPv4 Addr
..
...........: %s"
,
inet_ntoa
(
*
((
struct
in_addr
*
)
&
amf_addr
.
ipv4_addr
)));
Logger
::
config
().
info
(
" Port
................: %lu "
,
amf_addr
.
port
);
Logger
::
config
().
info
(
" Port
.
................: %lu "
,
amf_addr
.
port
);
Logger
::
config
().
info
(
" API version
.........: %s"
,
amf_addr
.
api_version
.
c_str
());
" API version
.
.........: %s"
,
amf_addr
.
api_version
.
c_str
());
}
//------------------------------------------------------------------------------
...
...
src/ausf_app/ausf_config.hpp
View file @
27b2451a
...
...
@@ -49,7 +49,7 @@
#define AUSF_CONFIG_STRING_AUSF_NAME "AUSF_NAME"
#define AUSF_CONFIG_STRING_INTERFACES "INTERFACES"
#define AUSF_CONFIG_STRING_INTERFACE_SBI
_AUSF "SBI_AUSF
"
#define AUSF_CONFIG_STRING_INTERFACE_SBI
"SBI
"
#define AUSF_CONFIG_STRING_INTERFACE_NAME "INTERFACE_NAME"
#define AUSF_CONFIG_STRING_IPV4_ADDRESS "IPV4_ADDRESS"
...
...
@@ -91,6 +91,7 @@ class ausf_config {
std
::
string
ausf_name
;
interface_cfg_t
sbi
;
struct
{
struct
in_addr
ipv4_addr
;
unsigned
int
port
;
...
...
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