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
4a5ceaff
Commit
4a5ceaff
authored
Feb 02, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support features list from conf file
parent
7d03ee3f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
128 deletions
+66
-128
etc/amf.conf
etc/amf.conf
+9
-1
etc/amf_eur.conf
etc/amf_eur.conf
+0
-118
src/amf-app/amf_config.cpp
src/amf-app/amf_config.cpp
+49
-8
src/amf-app/amf_config.hpp
src/amf-app/amf_config.hpp
+8
-1
No files found.
etc/amf.conf
View file @
4a5ceaff
...
...
@@ -54,7 +54,7 @@ AMF =
)
}
);
INTERFACES
:
{
# AMF binded interface for N1/N2 interface (NGAP)
...
...
@@ -87,6 +87,14 @@ AMF =
};
};
SUPPORT_FEATURES
:
{
#Register to NRF
NF_REGISTRATION
=
"yes"
;
# STRING, {"yes", "no"}, set to yes if AMF resgisters to an NRF
SMF_SELECTION
=
"no"
;
# STRING, {"yes", "no"}, set to yes to enable SMF discovery and selection
EXTERNAL_AUTH
=
"yes"
;
# STRING, {"yes", "no"}, set to yes if AMF works with an external AUSF/UDM
}
AUTHENTICATION
:
{
## MySQL mandatory options
...
...
etc/amf_eur.conf
deleted
100755 → 0
View file @
7d03ee3f
################################################################################
# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The OpenAirInterface Software Alliance licenses this file to You under
# the OAI Public License, Version 1.1 (the "License"); you may not use this file
# except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.openairinterface.org/?page_id=698
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#-------------------------------------------------------------------------------
# For more information about the OpenAirInterface (OAI) Software Alliance:
# contact@openairinterface.org
################################################################################
AMF
=
{
INSTANCE_ID
=
1
;
# 0 is the default
PID_DIRECTORY
=
"/var/run"
;
# /var/run is the default
AMF_NAME
=
"OAI-AMF"
;
RELATIVE_CAPACITY
=
30
;
# Display statistics about whole system (in seconds)
STATISTICS_TIMER_INTERVAL
=
20
;
# YOUR CONFIG HERE
CORE_CONFIGURATION
:
{
EMERGENCY_SUPPORT
=
"false"
;
};
GUAMI
:
{
MCC
=
"110"
;
MNC
=
"11"
;
RegionID
=
"128"
;
AMFSetID
=
"1"
;
AMFPointer
=
"1"
# YOUR GUAMI CONFIG HERE
}
SERVED_GUAMI_LIST
= (
{
MCC
=
"110"
;
MNC
=
"11"
;
RegionID
=
"128"
;
AMFSetID
=
"1"
;
AMFPointer
=
"0"
},
#48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
{
MCC
=
"110"
;
MNC
=
"11"
;
RegionID
=
"10"
;
AMFSetID
=
"1"
;
AMFPointer
=
"1"
}
#48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
);
PLMN_SUPPORT_LIST
= (
{
MCC
=
"110"
;
MNC
=
"11"
;
TAC
=
100
;
# YOUR PLMN CONFIG HERE
SLICE_SUPPORT_LIST
= (
{
SST
=
"1"
;
SD
=
"none"
},
# YOUR NSSAI CONFIG HERE
{
SST
=
"1"
;
SD
=
"12"
}
# YOUR NSSAI CONFIG HERE
)
}
);
INTERFACES
:
{
# AMF binded interface for N1/N2 interface (NGAP)
NGAP_AMF
:
{
INTERFACE_NAME
=
"ens32"
;
# YOUR NETWORK CONFIG HERE
IPV4_ADDRESS
=
"read"
;
PORT
=
38412
;
# YOUR NETWORK CONFIG HERE
PPID
=
60
;
# YOUR NETWORK CONFIG HERE
};
# AMF binded interface for N11
N11
:
{
INTERFACE_NAME
=
"ens32"
;
# YOUR NETWORK CONFIG HERE
IPV4_ADDRESS
=
"read"
;
PORT
=
8282
;
# YOUR NETWORK CONFIG HERE
SMF_INSTANCES_POOL
= (
{
SMF_INSTANCE_ID
=
1
;
IPV4_ADDRESS
=
"192.168.199.203"
;
PORT
=
"8889"
;
VERSION
=
"v1"
;
SELECTED
=
"true"
},
# YOUR SMF CONFIG HERE
{
SMF_INSTANCE_ID
=
2
;
IPV4_ADDRESS
=
"192.168.122.2"
;
PORT
=
"80"
;
VERSION
=
"v1"
;
SELECTED
=
"false"
}
# YOUR SMF CONFIG HERE
);
};
NRF
:
{
IPV4_ADDRESS
=
"192.168.12.100"
;
# YOUR NRF CONFIG HERE
PORT
=
80
;
# YOUR NRF CONFIG HERE (default: 80)
API_VERSION
=
"v1"
;
# YOUR NRF API VERSION FOR SBI CONFIG HERE
};
};
AUTHENTICATION
:
{
## MySQL mandatory options
MYSQL_server
=
"127.0.0.1"
;
# MySQL Server address
MYSQL_user
=
"bupt"
;
# Database server login
MYSQL_pass
=
"linux"
;
# Database server password
MYSQL_db
=
"OAI_DB"
;
# Your database name
## OP
OPERATOR_key
=
"63bfa50ee6523365ff14c1f45f88737d"
;
# OP key matching your database
RANDOM
=
"true"
;
};
NAS
:
{
ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST
= [
"NIA2"
,
"NIA1"
,
"NIA0"
];
ORDERED_SUPPORTED_CIPHERING_ALGORITHM_LIST
= [
"NEA0"
,
"NEA1"
,
"NEA2"
];
};
};
MODULES
=
{
NGAP_MESSAGE
= (
{
MSG_NAME
=
"NGSetupRequest"
;
ProcedureCode
=
21
;
TypeOfMessage
=
"initialMessage"
}
);
};
src/amf-app/amf_config.cpp
View file @
4a5ceaff
...
...
@@ -60,6 +60,9 @@ amf_config::amf_config() {
nrf_addr
.
ipv4_addr
.
s_addr
=
INADDR_ANY
;
nrf_addr
.
port
=
80
;
nrf_addr
.
api_version
=
"v1"
;
enable_nf_registration
=
false
;
enable_smf_selection
=
false
;
enable_external_auth
=
false
;
// TODO:
}
...
...
@@ -300,6 +303,40 @@ int amf_config::load(const std::string& config_file) {
"%s : %s, using defaults"
,
nfex
.
what
(),
nfex
.
getPath
());
return
-
1
;
}
try
{
const
Setting
&
support_features
=
amf_cfg
[
AMF_CONFIG_STRING_SUPPORT_FEATURES
];
string
opt
;
support_features
.
lookupValue
(
AMF_CONFIG_STRING_SUPPORT_FEATURES_NF_REGISTRATION
,
opt
);
if
(
boost
::
iequals
(
opt
,
"yes"
))
{
enable_nf_registration
=
true
;
}
else
{
enable_nf_registration
=
false
;
}
support_features
.
lookupValue
(
AMF_CONFIG_STRING_SUPPORT_FEATURES_SMF_SELECTION
,
opt
);
if
(
boost
::
iequals
(
opt
,
"yes"
))
{
enable_smf_selection
=
true
;
}
else
{
enable_smf_selection
=
false
;
}
support_features
.
lookupValue
(
AMF_CONFIG_STRING_SUPPORT_FEATURES_EXTERNAL_AUTH
,
opt
);
if
(
boost
::
iequals
(
opt
,
"yes"
))
{
enable_external_auth
=
true
;
}
else
{
enable_external_auth
=
false
;
}
}
catch
(
const
SettingNotFoundException
&
nfex
)
{
Logger
::
amf_app
().
error
(
"%s : %s, using defaults"
,
nfex
.
what
(),
nfex
.
getPath
());
return
-
1
;
}
}
//------------------------------------------------------------------------------
...
...
@@ -369,14 +406,14 @@ void amf_config::display() {
auth_para
.
random
.
c_str
());
Logger
::
config
().
info
(
"- N2 Networking:"
);
Logger
::
config
().
info
(
" iface ................: %s"
,
n2
.
if_name
.
c_str
());
Logger
::
config
().
info
(
" ip ...................: %s"
,
inet_ntoa
(
n2
.
addr4
));
Logger
::
config
().
info
(
" port .................: %d"
,
n2
.
port
);
Logger
::
config
().
info
(
" iface ................
.
: %s"
,
n2
.
if_name
.
c_str
());
Logger
::
config
().
info
(
" ip ...................
.
: %s"
,
inet_ntoa
(
n2
.
addr4
));
Logger
::
config
().
info
(
" port .................
.
: %d"
,
n2
.
port
);
Logger
::
config
().
info
(
"- SBI Networking:"
);
Logger
::
config
().
info
(
" iface ................: %s"
,
n11
.
if_name
.
c_str
());
Logger
::
config
().
info
(
" ip ...................: %s"
,
inet_ntoa
(
n11
.
addr4
));
Logger
::
config
().
info
(
" port .................: %d"
,
n11
.
port
);
Logger
::
config
().
info
(
" iface ................
.
: %s"
,
n11
.
if_name
.
c_str
());
Logger
::
config
().
info
(
" ip ...................
.
: %s"
,
inet_ntoa
(
n11
.
addr4
));
Logger
::
config
().
info
(
" port .................
.
: %d"
,
n11
.
port
);
Logger
::
config
().
info
(
"- NRF:"
);
Logger
::
config
().
info
(
...
...
@@ -388,7 +425,7 @@ void amf_config::display() {
// Logger::config().info(" HTTP2 port ............: %d", n11_http2_port);
Logger
::
config
().
info
(
"- Remote SMF Pool.........
............................
: "
);
"- Remote SMF Pool.........: "
);
for
(
int
i
=
0
;
i
<
smf_pool
.
size
();
i
++
)
{
std
::
string
selected
;
if
(
smf_pool
[
i
].
selected
)
...
...
@@ -400,6 +437,11 @@ void amf_config::display() {
smf_pool
[
i
].
id
,
smf_pool
[
i
].
ipv4
.
c_str
(),
smf_pool
[
i
].
port
.
c_str
(),
smf_pool
[
i
].
version
.
c_str
(),
selected
.
c_str
());
}
Logger
::
config
().
info
(
"- Supported Features:"
);
Logger
::
config
().
info
(
" NF Registration........: %s"
,
enable_nf_registration
?
"Yes"
:
"No"
);
Logger
::
config
().
info
(
" SMF Selection..........: %s"
,
enable_smf_selection
?
"Yes"
:
"No"
);
Logger
::
config
().
info
(
" External Authentication: %s"
,
enable_external_auth
?
"Yes"
:
"No"
);
}
//------------------------------------------------------------------------------
...
...
@@ -444,7 +486,6 @@ int amf_config::load_interface(
0xFFFFFFFF
<<
(
32
-
std
::
stoi
(
util
::
trim
(
words
.
at
(
1
)))));
}
if_cfg
.
lookupValue
(
AMF_CONFIG_STRING_PORT
,
cfg
.
port
);
}
return
RETURNok
;
}
...
...
src/amf-app/amf_config.hpp
View file @
4a5ceaff
...
...
@@ -95,6 +95,10 @@
"ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST"
#define AMF_CONFIG_STRING_NAS_SUPPORTED_CIPHERING_ALGORITHM_LIST \
"ORDERED_SUPPORTED_CIPHERING_ALGORITHM_LIST"
#define AMF_CONFIG_STRING_SUPPORT_FEATURES "SUPPORT_FEATURES"
#define AMF_CONFIG_STRING_SUPPORT_FEATURES_NF_REGISTRATION "NF_REGISTRATION"
#define AMF_CONFIG_STRING_SUPPORT_FEATURES_SMF_SELECTION "SMF_SELECTION"
#define AMF_CONFIG_STRING_SUPPORT_FEATURES_EXTERNAL_AUTH "EXTERNAL_AUTH"
using
namespace
libconfig
;
...
...
@@ -116,7 +120,7 @@ typedef struct interface_cfg_s {
struct
in6_addr
addr6
;
unsigned
int
mtu
;
unsigned
int
port
;
// util::thread_sched_params thread_rd_sched_params;
// util::thread_sched_params thread_rd_sched_params;
}
interface_cfg_t
;
typedef
struct
itti_cfg_s
{
...
...
@@ -183,6 +187,9 @@ class amf_config {
auth_conf
auth_para
;
nas_conf_t
nas_cfg
;
std
::
vector
<
smf_inst_t
>
smf_pool
;
bool
enable_nf_registration
;
bool
enable_smf_selection
;
bool
enable_external_auth
;
struct
{
struct
in_addr
ipv4_addr
;
...
...
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