Commit 03bba035 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Support FQDN for SMF

parent 129bc937
...@@ -72,28 +72,27 @@ AMF = ...@@ -72,28 +72,27 @@ AMF =
INTERFACE_NAME = "@AMF_INTERFACE_NAME_FOR_N11@"; # YOUR NETWORK CONFIG HERE INTERFACE_NAME = "@AMF_INTERFACE_NAME_FOR_N11@"; # YOUR NETWORK CONFIG HERE
IPV4_ADDRESS = "read"; IPV4_ADDRESS = "read";
PORT = 80; # YOUR NETWORK CONFIG HERE PORT = 80; # YOUR NETWORK CONFIG HERE
API_VERSION = "v1"; # YOUR AMF API VERSION CONFIG HERE API_VERSION = "v1"; # YOUR AMF API VERSION CONFIG HERE
SMF_INSTANCES_POOL = ( SMF_INSTANCES_POOL = (
{SMF_INSTANCE_ID = @SMF_INSTANCE_ID_0@; IPV4_ADDRESS = "@SMF_IPV4_ADDR_0@"; PORT = "80"; VERSION = "@SMF_HTTP_VERSION_0@"; SELECTED = "true"}, # YOUR SMF CONFIG HERE {SMF_INSTANCE_ID = @SMF_INSTANCE_ID_0@; IPV4_ADDRESS = "@SMF_IPV4_ADDR_0@"; PORT = "80"; VERSION = "@SMF_HTTP_VERSION_0@"; FQDN = "@SMF_FQDN_0@", SELECTED = "true"}, # YOUR SMF CONFIG HERE
{SMF_INSTANCE_ID = @SMF_INSTANCE_ID_1@; IPV4_ADDRESS = "@SMF_IPV4_ADDR_1@"; PORT = "80"; VERSION = "@SMF_HTTP_VERSION_1@"; SELECTED = "false"} # YOUR SMF CONFIG HERE {SMF_INSTANCE_ID = @SMF_INSTANCE_ID_1@; IPV4_ADDRESS = "@SMF_IPV4_ADDR_1@"; PORT = "80"; VERSION = "@SMF_HTTP_VERSION_1@"; FQDN = "@SMF_FQDN_1@", SELECTED = "false"} # YOUR SMF CONFIG HERE
); );
}; };
NRF : NRF :
{ {
IPV4_ADDRESS = "@NRF_IPV4_ADDRESS@"; # YOUR NRF CONFIG HERE IPV4_ADDRESS = "@NRF_IPV4_ADDRESS@"; # YOUR NRF CONFIG HERE
PORT = @NRF_PORT@; # YOUR NRF CONFIG HERE (default: 80) PORT = @NRF_PORT@; # YOUR NRF CONFIG HERE (default: 80)
API_VERSION = "@NRF_API_VERSION@"; # YOUR NRF API VERSION FOR SBI CONFIG HERE API_VERSION = "@NRF_API_VERSION@"; # YOUR NRF API VERSION FOR SBI CONFIG HERE
FQDN = "@NRF_FQDN@" FQDN = "@NRF_FQDN@"
}; };
AUSF : AUSF :
{ {
IPV4_ADDRESS = "@AUSF_IPV4_ADDRESS@"; # YOUR AUSF CONFIG HERE IPV4_ADDRESS = "@AUSF_IPV4_ADDRESS@"; # YOUR AUSF CONFIG HERE
PORT = @AUSF_PORT@; # YOUR AUSF CONFIG HERE (default: 80) PORT = @AUSF_PORT@; # YOUR AUSF CONFIG HERE (default: 80)
API_VERSION = "@AUSF_API_VERSION@"; # YOUR AUSF API VERSION FOR SBI CONFIG HERE API_VERSION = "@AUSF_API_VERSION@"; # YOUR AUSF API VERSION FOR SBI CONFIG HERE
}; };
}; };
...@@ -102,10 +101,10 @@ AMF = ...@@ -102,10 +101,10 @@ AMF =
{ {
# STRING, {"yes", "no"}, # STRING, {"yes", "no"},
NF_REGISTRATION = "@NF_REGISTRATION@"; # Set to yes if AMF resgisters to an NRF NF_REGISTRATION = "@NF_REGISTRATION@"; # Set to yes if AMF resgisters to an NRF
SMF_SELECTION = "@SMF_SELECTION@"; # Set to yes to enable SMF discovery and selection SMF_SELECTION = "@SMF_SELECTION@"; # Set to yes to enable SMF discovery and selection
EXTERNAL_AUSF = "no"; # Set to yes if AMF works with an external AUSF EXTERNAL_AUSF = "no"; # Set to yes if AMF works with an external AUSF
EXTERNAL_UDM = "no"; # Set to yes if AMF works with an external UDM EXTERNAL_UDM = "no"; # Set to yes if AMF works with an external UDM
USE_FQDN_DNS = "no"; # Set to yes if AMF relies on a DNS to resolve SMF/UDM/NRF/UPF's FQDN USE_FQDN_DNS = "no"; # Set to yes if AMF relies on a DNS to resolve SMF/UDM/NRF/UPF's FQDN
} }
AUTHENTICATION: AUTHENTICATION:
......
...@@ -106,6 +106,8 @@ int amf_config::load(const std::string& config_file) { ...@@ -106,6 +106,8 @@ int amf_config::load(const std::string& config_file) {
"\nLoad AMF system configuration file(%s)", config_file.c_str()); "\nLoad AMF system configuration file(%s)", config_file.c_str());
Config cfg; Config cfg;
unsigned char buf_in6_addr[sizeof(struct in6_addr)]; unsigned char buf_in6_addr[sizeof(struct in6_addr)];
// Config file
try { try {
cfg.readFile(config_file.c_str()); cfg.readFile(config_file.c_str());
} catch (const FileIOException& fioex) { } catch (const FileIOException& fioex) {
...@@ -119,13 +121,18 @@ int amf_config::load(const std::string& config_file) { ...@@ -119,13 +121,18 @@ int amf_config::load(const std::string& config_file) {
pex.getError()); pex.getError());
throw; throw;
} }
const Setting& root = cfg.getRoot(); const Setting& root = cfg.getRoot();
// AMF config
try { try {
const Setting& amf_cfg = root[AMF_CONFIG_STRING_AMF_CONFIG]; const Setting& amf_cfg = root[AMF_CONFIG_STRING_AMF_CONFIG];
} catch (const SettingNotFoundException& nfex) { } catch (const SettingNotFoundException& nfex) {
Logger::amf_app().error("%s : %s", nfex.what(), nfex.getPath()); Logger::amf_app().error("%s : %s", nfex.what(), nfex.getPath());
return -1; return -1;
} }
// Instance
const Setting& amf_cfg = root[AMF_CONFIG_STRING_AMF_CONFIG]; const Setting& amf_cfg = root[AMF_CONFIG_STRING_AMF_CONFIG];
try { try {
amf_cfg.lookupValue(AMF_CONFIG_STRING_INSTANCE_ID, instance); amf_cfg.lookupValue(AMF_CONFIG_STRING_INSTANCE_ID, instance);
...@@ -133,6 +140,8 @@ int amf_config::load(const std::string& config_file) { ...@@ -133,6 +140,8 @@ int amf_config::load(const std::string& config_file) {
Logger::amf_app().error( Logger::amf_app().error(
"%s : %s, using defaults", nfex.what(), nfex.getPath()); "%s : %s, using defaults", nfex.what(), nfex.getPath());
} }
// Statistic Timer interval
try { try {
amf_cfg.lookupValue( amf_cfg.lookupValue(
AMF_CONFIG_STRING_STATISTICS_TIMER_INTERVAL, statistics_interval); AMF_CONFIG_STRING_STATISTICS_TIMER_INTERVAL, statistics_interval);
...@@ -140,18 +149,24 @@ int amf_config::load(const std::string& config_file) { ...@@ -140,18 +149,24 @@ int amf_config::load(const std::string& config_file) {
Logger::amf_app().error( Logger::amf_app().error(
"%s : %s, using defaults", nfex.what(), nfex.getPath()); "%s : %s, using defaults", nfex.what(), nfex.getPath());
} }
// PID Dir
try { try {
amf_cfg.lookupValue(AMF_CONFIG_STRING_PID_DIRECTORY, pid_dir); amf_cfg.lookupValue(AMF_CONFIG_STRING_PID_DIRECTORY, pid_dir);
} catch (const SettingNotFoundException& nfex) { } catch (const SettingNotFoundException& nfex) {
Logger::amf_app().error( Logger::amf_app().error(
"%s : %s, using defaults", nfex.what(), nfex.getPath()); "%s : %s, using defaults", nfex.what(), nfex.getPath());
} }
// AMF Name
try { try {
amf_cfg.lookupValue(AMF_CONFIG_STRING_AMF_NAME, AMF_Name); amf_cfg.lookupValue(AMF_CONFIG_STRING_AMF_NAME, AMF_Name);
} catch (const SettingNotFoundException& nfex) { } catch (const SettingNotFoundException& nfex) {
Logger::amf_app().error( Logger::amf_app().error(
"%s : %s, using defaults", nfex.what(), nfex.getPath()); "%s : %s, using defaults", nfex.what(), nfex.getPath());
} }
// GUAMI
try { try {
const Setting& guami_cfg = amf_cfg[AMF_CONFIG_STRING_GUAMI]; const Setting& guami_cfg = amf_cfg[AMF_CONFIG_STRING_GUAMI];
guami_cfg.lookupValue(AMF_CONFIG_STRING_MCC, guami.mcc); guami_cfg.lookupValue(AMF_CONFIG_STRING_MCC, guami.mcc);
...@@ -163,6 +178,8 @@ int amf_config::load(const std::string& config_file) { ...@@ -163,6 +178,8 @@ int amf_config::load(const std::string& config_file) {
Logger::amf_app().error( Logger::amf_app().error(
"%s : %s, using defaults", nfex.what(), nfex.getPath()); "%s : %s, using defaults", nfex.what(), nfex.getPath());
} }
// GUAMI List
try { try {
const Setting& guami_list_cfg = const Setting& guami_list_cfg =
amf_cfg[AMF_CONFIG_STRING_SERVED_GUAMI_LIST]; amf_cfg[AMF_CONFIG_STRING_SERVED_GUAMI_LIST];
...@@ -181,6 +198,8 @@ int amf_config::load(const std::string& config_file) { ...@@ -181,6 +198,8 @@ int amf_config::load(const std::string& config_file) {
Logger::amf_app().error( Logger::amf_app().error(
"%s : %s, using defaults", nfex.what(), nfex.getPath()); "%s : %s, using defaults", nfex.what(), nfex.getPath());
} }
// AMF Capacity
try { try {
amf_cfg.lookupValue( amf_cfg.lookupValue(
AMF_CONFIG_STRING_RELATIVE_AMF_CAPACITY, relativeAMFCapacity); AMF_CONFIG_STRING_RELATIVE_AMF_CAPACITY, relativeAMFCapacity);
...@@ -188,6 +207,8 @@ int amf_config::load(const std::string& config_file) { ...@@ -188,6 +207,8 @@ int amf_config::load(const std::string& config_file) {
Logger::amf_app().error( Logger::amf_app().error(
"%s : %s, using defaults", nfex.what(), nfex.getPath()); "%s : %s, using defaults", nfex.what(), nfex.getPath());
} }
// PLMN List
try { try {
const Setting& plmn_list_cfg = amf_cfg[AMF_CONFIG_STRING_PLMN_SUPPORT_LIST]; const Setting& plmn_list_cfg = amf_cfg[AMF_CONFIG_STRING_PLMN_SUPPORT_LIST];
int count = plmn_list_cfg.getLength(); int count = plmn_list_cfg.getLength();
...@@ -214,6 +235,7 @@ int amf_config::load(const std::string& config_file) { ...@@ -214,6 +235,7 @@ int amf_config::load(const std::string& config_file) {
"%s : %s, using defaults", nfex.what(), nfex.getPath()); "%s : %s, using defaults", nfex.what(), nfex.getPath());
} }
// Supported features
try { try {
const Setting& support_features = const Setting& support_features =
amf_cfg[AMF_CONFIG_STRING_SUPPORT_FEATURES]; amf_cfg[AMF_CONFIG_STRING_SUPPORT_FEATURES];
...@@ -249,6 +271,7 @@ int amf_config::load(const std::string& config_file) { ...@@ -249,6 +271,7 @@ int amf_config::load(const std::string& config_file) {
} else { } else {
enable_external_udm = false; enable_external_udm = false;
} }
support_features.lookupValue( support_features.lookupValue(
AMF_CONFIG_STRING_SUPPORT_FEATURES_USE_FQDN_DNS, opt); AMF_CONFIG_STRING_SUPPORT_FEATURES_USE_FQDN_DNS, opt);
if (boost::iequals(opt, "yes")) { if (boost::iequals(opt, "yes")) {
...@@ -263,13 +286,20 @@ int amf_config::load(const std::string& config_file) { ...@@ -263,13 +286,20 @@ int amf_config::load(const std::string& config_file) {
return -1; return -1;
} }
// Network interfaces
// TODO: should move SMF/NRF/AUSF out of this section
try { try {
const Setting& new_if_cfg = amf_cfg[AMF_CONFIG_STRING_INTERFACES]; const Setting& new_if_cfg = amf_cfg[AMF_CONFIG_STRING_INTERFACES];
// N2
const Setting& n2_amf_cfg = const Setting& n2_amf_cfg =
new_if_cfg[AMF_CONFIG_STRING_INTERFACE_NGAP_AMF]; new_if_cfg[AMF_CONFIG_STRING_INTERFACE_NGAP_AMF];
load_interface(n2_amf_cfg, n2); load_interface(n2_amf_cfg, n2);
// N11
const Setting& n11_cfg = new_if_cfg[AMF_CONFIG_STRING_INTERFACE_N11]; const Setting& n11_cfg = new_if_cfg[AMF_CONFIG_STRING_INTERFACE_N11];
load_interface(n11_cfg, n11); load_interface(n11_cfg, n11);
// SBI API VERSION // SBI API VERSION
if (!(n11_cfg.lookupValue( if (!(n11_cfg.lookupValue(
AMF_CONFIG_STRING_API_VERSION, sbi_api_version))) { AMF_CONFIG_STRING_API_VERSION, sbi_api_version))) {
...@@ -277,22 +307,57 @@ int amf_config::load(const std::string& config_file) { ...@@ -277,22 +307,57 @@ int amf_config::load(const std::string& config_file) {
throw(AMF_CONFIG_STRING_API_VERSION "failed"); throw(AMF_CONFIG_STRING_API_VERSION "failed");
} }
// SMF
const Setting& smf_addr_pool = const Setting& smf_addr_pool =
n11_cfg[AMF_CONFIG_STRING_SMF_INSTANCES_POOL]; n11_cfg[AMF_CONFIG_STRING_SMF_INSTANCES_POOL];
int count = smf_addr_pool.getLength(); int count = smf_addr_pool.getLength();
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
const Setting& smf_addr_item = smf_addr_pool[i]; const Setting& smf_addr_item = smf_addr_pool[i];
smf_inst_t smf_inst; smf_inst_t smf_inst = {};
std::string selected; struct in_addr smf_ipv4_addr = {};
unsigned int smf_port = {};
std::string smf_api_version = {};
std::string selected = {};
smf_addr_item.lookupValue(AMF_CONFIG_STRING_SMF_INSTANCE_ID, smf_inst.id); smf_addr_item.lookupValue(AMF_CONFIG_STRING_SMF_INSTANCE_ID, smf_inst.id);
smf_addr_item.lookupValue(AMF_CONFIG_STRING_IPV4_ADDRESS, smf_inst.ipv4); if (!use_fqdn_dns) {
smf_addr_item.lookupValue( smf_addr_item.lookupValue(
AMF_CONFIG_STRING_SMF_INSTANCE_PORT, smf_inst.port); AMF_CONFIG_STRING_IPV4_ADDRESS, smf_inst.ipv4);
smf_addr_item.lookupValue( IPV4_STR_ADDR_TO_INADDR(
AMF_CONFIG_STRING_SMF_INSTANCE_VERSION, smf_inst.version); util::trim(smf_inst.ipv4).c_str(), smf_ipv4_addr,
"BAD IPv4 ADDRESS FORMAT FOR SMF !");
if (!(smf_addr_item.lookupValue(
AMF_CONFIG_STRING_SMF_INSTANCE_PORT, smf_inst.port))) {
Logger::amf_app().error(AMF_CONFIG_STRING_SMF_INSTANCE_PORT "failed");
throw(AMF_CONFIG_STRING_SMF_INSTANCE_PORT "failed");
}
smf_addr_item.lookupValue(
AMF_CONFIG_STRING_SMF_INSTANCE_VERSION, smf_inst.version);
if (!(smf_addr_item.lookupValue(
AMF_CONFIG_STRING_SMF_INSTANCE_VERSION, smf_inst.version))) {
Logger::amf_app().error(AMF_CONFIG_STRING_SMF_INSTANCE_VERSION
"failed");
throw(AMF_CONFIG_STRING_SMF_INSTANCE_VERSION "failed");
}
} else {
std::string smf_fqdn = {};
smf_addr_item.lookupValue(AMF_CONFIG_STRING_FQDN_DNS, smf_fqdn);
uint8_t addr_type = 0;
fqdn::resolve(smf_fqdn, smf_inst.ipv4, smf_port, addr_type);
if (addr_type != 0) { // IPv6: TODO
throw("DO NOT SUPPORT IPV6 ADDR FOR SMF!");
} else { // IPv4
IPV4_STR_ADDR_TO_INADDR(
util::trim(smf_inst.ipv4).c_str(), smf_ipv4_addr,
"BAD IPv4 ADDRESS FORMAT FOR SMF !");
smf_inst.port = std::to_string(smf_port);
smf_inst.version = "v1"; // TODO: get API version
}
}
smf_addr_item.lookupValue( smf_addr_item.lookupValue(
AMF_CONFIG_STRING_SMF_INSTANCE_SELECTED, selected); AMF_CONFIG_STRING_SMF_INSTANCE_SELECTED, selected);
if (!selected.compare("true")) if (boost::iequals(selected, "true"))
smf_inst.selected = true; smf_inst.selected = true;
else else
smf_inst.selected = false; smf_inst.selected = false;
...@@ -300,11 +365,12 @@ int amf_config::load(const std::string& config_file) { ...@@ -300,11 +365,12 @@ int amf_config::load(const std::string& config_file) {
} }
// NRF // NRF
const Setting& nrf_cfg = new_if_cfg[AMF_CONFIG_STRING_NRF]; const Setting& nrf_cfg = new_if_cfg[AMF_CONFIG_STRING_NRF];
struct in_addr nrf_ipv4_addr; struct in_addr nrf_ipv4_addr = {};
unsigned int nrf_port = 0; unsigned int nrf_port = 0;
std::string nrf_api_version; std::string nrf_api_version = {};
string address; string address = {};
if (!use_fqdn_dns) { if (!use_fqdn_dns) {
nrf_cfg.lookupValue(AMF_CONFIG_STRING_NRF_IPV4_ADDRESS, address); nrf_cfg.lookupValue(AMF_CONFIG_STRING_NRF_IPV4_ADDRESS, address);
IPV4_STR_ADDR_TO_INADDR( IPV4_STR_ADDR_TO_INADDR(
...@@ -316,7 +382,6 @@ int amf_config::load(const std::string& config_file) { ...@@ -316,7 +382,6 @@ int amf_config::load(const std::string& config_file) {
throw(AMF_CONFIG_STRING_NRF_PORT "failed"); throw(AMF_CONFIG_STRING_NRF_PORT "failed");
} }
nrf_addr.port = nrf_port; nrf_addr.port = nrf_port;
if (!(nrf_cfg.lookupValue( if (!(nrf_cfg.lookupValue(
AMF_CONFIG_STRING_API_VERSION, nrf_api_version))) { AMF_CONFIG_STRING_API_VERSION, nrf_api_version))) {
Logger::amf_app().error(AMF_CONFIG_STRING_API_VERSION "failed"); Logger::amf_app().error(AMF_CONFIG_STRING_API_VERSION "failed");
...@@ -326,30 +391,26 @@ int amf_config::load(const std::string& config_file) { ...@@ -326,30 +391,26 @@ int amf_config::load(const std::string& config_file) {
} else { } else {
std::string nrf_fqdn = {}; std::string nrf_fqdn = {};
nrf_cfg.lookupValue(AMF_CONFIG_STRING_FQDN_DNS, nrf_fqdn); nrf_cfg.lookupValue(AMF_CONFIG_STRING_FQDN_DNS, nrf_fqdn);
uint8_t addr_type = 0; uint8_t addr_type = {};
fqdn::resolve(nrf_fqdn, address, nrf_port, addr_type); fqdn::resolve(nrf_fqdn, address, nrf_port, addr_type);
if (addr_type != 0) { if (addr_type != 0) { // IPv6: TODO
// IPv6 throw("DO NOT SUPPORT IPV6 ADDR FOR NRF!");
// TODO: } else { // IPv4
throw(
"DO NOT SUPPORT IPV6 ADDR FOR NRF"
"failed");
} else {
// IPv4
IPV4_STR_ADDR_TO_INADDR( IPV4_STR_ADDR_TO_INADDR(
util::trim(address).c_str(), nrf_ipv4_addr, util::trim(address).c_str(), nrf_ipv4_addr,
"BAD IPv4 ADDRESS FORMAT FOR NRF !"); "BAD IPv4 ADDRESS FORMAT FOR NRF !");
nrf_addr.ipv4_addr = nrf_ipv4_addr; nrf_addr.ipv4_addr = nrf_ipv4_addr;
nrf_addr.port = nrf_port; nrf_addr.port = nrf_port;
nrf_addr.api_version = "v1"; // TODO: get API version
} }
// TODO: How to get API version from DNS
} }
// AUSF // AUSF
const Setting& ausf_cfg = new_if_cfg[AMF_CONFIG_STRING_AUSF]; const Setting& ausf_cfg = new_if_cfg[AMF_CONFIG_STRING_AUSF];
struct in_addr ausf_ipv4_addr; struct in_addr ausf_ipv4_addr = {};
unsigned int ausf_port = 0; unsigned int ausf_port = {};
std::string ausf_api_version; std::string ausf_api_version = {};
// string address;
ausf_cfg.lookupValue(AMF_CONFIG_STRING_IPV4_ADDRESS, address); ausf_cfg.lookupValue(AMF_CONFIG_STRING_IPV4_ADDRESS, address);
IPV4_STR_ADDR_TO_INADDR( IPV4_STR_ADDR_TO_INADDR(
util::trim(address).c_str(), ausf_ipv4_addr, util::trim(address).c_str(), ausf_ipv4_addr,
...@@ -373,6 +434,8 @@ int amf_config::load(const std::string& config_file) { ...@@ -373,6 +434,8 @@ int amf_config::load(const std::string& config_file) {
"%s : %s, using defaults", nfex.what(), nfex.getPath()); "%s : %s, using defaults", nfex.what(), nfex.getPath());
return -1; return -1;
} }
// Emergency support
try { try {
const Setting& core_config = amf_cfg[AMF_CONFIG_STRING_CORE_CONFIGURATION]; const Setting& core_config = amf_cfg[AMF_CONFIG_STRING_CORE_CONFIGURATION];
core_config.lookupValue( core_config.lookupValue(
...@@ -382,6 +445,9 @@ int amf_config::load(const std::string& config_file) { ...@@ -382,6 +445,9 @@ int amf_config::load(const std::string& config_file) {
"%s : %s, using defaults", nfex.what(), nfex.getPath()); "%s : %s, using defaults", nfex.what(), nfex.getPath());
return -1; return -1;
} }
// Authentication Info
// TODO: remove operator_key, random
try { try {
const Setting& auth = amf_cfg[AMF_CONFIG_STRING_AUTHENTICATION]; const Setting& auth = amf_cfg[AMF_CONFIG_STRING_AUTHENTICATION];
auth.lookupValue( auth.lookupValue(
...@@ -397,6 +463,8 @@ int amf_config::load(const std::string& config_file) { ...@@ -397,6 +463,8 @@ int amf_config::load(const std::string& config_file) {
"%s : %s, using defaults", nfex.what(), nfex.getPath()); "%s : %s, using defaults", nfex.what(), nfex.getPath());
return -1; return -1;
} }
// Integrity/Ciphering algorithms (NAS)
try { try {
const Setting& nas = amf_cfg[AMF_CONFIG_STRING_NAS]; const Setting& nas = amf_cfg[AMF_CONFIG_STRING_NAS];
const Setting& intAlg = const Setting& intAlg =
...@@ -485,40 +553,42 @@ void amf_config::display() { ...@@ -485,40 +553,42 @@ void amf_config::display() {
"- MySQL pass ..............: %s", auth_para.mysql_pass.c_str()); "- MySQL pass ..............: %s", auth_para.mysql_pass.c_str());
Logger::config().info( Logger::config().info(
"- MySQL DB ................: %s", auth_para.mysql_db.c_str()); "- MySQL DB ................: %s", auth_para.mysql_db.c_str());
Logger::config().info(
"- operator key ............: %s", auth_para.operator_key.c_str()); /* Logger::config().info(
Logger::config().info( "- operator key ............: %s", auth_para.operator_key.c_str());
"- random ..................: %s", auth_para.random.c_str()); Logger::config().info(
"- random ..................: %s", auth_para.random.c_str());
*/
Logger::config().info("- N2 Networking:"); Logger::config().info("- N2 Networking:");
Logger::config().info(" iface .................: %s", n2.if_name.c_str()); Logger::config().info(" Iface .................: %s", n2.if_name.c_str());
Logger::config().info(" ip ....................: %s", inet_ntoa(n2.addr4)); Logger::config().info(" IP Addr ...............: %s", inet_ntoa(n2.addr4));
Logger::config().info(" port ..................: %d", n2.port); Logger::config().info(" Port ..................: %d", n2.port);
Logger::config().info("- SBI Networking:"); Logger::config().info("- SBI Networking:");
Logger::config().info(" iface .................: %s", n11.if_name.c_str()); Logger::config().info(" Iface .................: %s", n11.if_name.c_str());
Logger::config().info( Logger::config().info(
" ip ....................: %s", inet_ntoa(n11.addr4)); " IP Addr ...............: %s", inet_ntoa(n11.addr4));
Logger::config().info(" port ..................: %d", n11.port); Logger::config().info(" Port ..................: %d", n11.port);
Logger::config().info( Logger::config().info(
" API version............: %s", sbi_api_version.c_str()); " API version............: %s", sbi_api_version.c_str());
if (enable_nf_registration or enable_smf_selection) { if (enable_nf_registration or enable_smf_selection) {
Logger::config().info("- NRF:"); Logger::config().info("- NRF:");
Logger::config().info( Logger::config().info(
" IP addr ...............: %s", inet_ntoa(nrf_addr.ipv4_addr)); " IP Addr ...............: %s", inet_ntoa(nrf_addr.ipv4_addr));
Logger::config().info(" Port ..................: %d", nrf_addr.port); Logger::config().info(" Port ..................: %d", nrf_addr.port);
Logger::config().info( Logger::config().info(
" Api version ...........: %s", nrf_addr.api_version.c_str()); " API version ...........: %s", nrf_addr.api_version.c_str());
} }
if (enable_external_ausf) { if (enable_external_ausf) {
Logger::config().info("- AUSF:"); Logger::config().info("- AUSF:");
Logger::config().info( Logger::config().info(
" IP addr ...............: %s", inet_ntoa(ausf_addr.ipv4_addr)); " IP Addr ...............: %s", inet_ntoa(ausf_addr.ipv4_addr));
Logger::config().info(" Port ..................: %d", ausf_addr.port); Logger::config().info(" Port ..................: %d", ausf_addr.port);
Logger::config().info( Logger::config().info(
" Api version ...........: %s", ausf_addr.api_version.c_str()); " API version ...........: %s", ausf_addr.api_version.c_str());
} }
Logger::config().info("- Remote SMF Pool.........: "); Logger::config().info("- Remote SMF Pool.........: ");
...@@ -543,6 +613,8 @@ void amf_config::display() { ...@@ -543,6 +613,8 @@ void amf_config::display() {
" External AUSF .........: %s", enable_external_ausf ? "Yes" : "No"); " External AUSF .........: %s", enable_external_ausf ? "Yes" : "No");
Logger::config().info( Logger::config().info(
" External UDM ..........: %s", enable_external_udm ? "Yes" : "No"); " External UDM ..........: %s", enable_external_udm ? "Yes" : "No");
Logger::config().info(
" Use FQDN ..............: %s", use_fqdn_dns ? "Yes" : "No");
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment