116 lines
2.6 KiB
C
116 lines
2.6 KiB
C
//
|
|
// Created by xajhu on 2021/7/7 0007.
|
|
//
|
|
#include "config.h"
|
|
|
|
const char *config_get_vxlan_nic_name() {
|
|
return cfg_get_string_value(CFG_VXLAN_NIC_NAME);
|
|
}
|
|
|
|
const char *config_get_vxlan_peer_ip() {
|
|
return cfg_get_string_value(CFG_VXLAN_PEER_IP);
|
|
}
|
|
|
|
const char *config_get_vxlan_peer_mac() {
|
|
return cfg_get_string_value(CFG_VXLAN_PEER_MAC);
|
|
}
|
|
|
|
const char *config_get_vxlan_pkg_filter() {
|
|
return cfg_get_string_value(CFG_VXLAN_PKG_FILTER);
|
|
}
|
|
|
|
int cfg_get_support_vxlan() {
|
|
return cfg_get_bool_value(CFG_VXLAN_SUPPORT);
|
|
}
|
|
|
|
const char *config_get_ssl_ca_path() {
|
|
return cfg_get_string_value(CFG_CURL_CA_PATH);
|
|
}
|
|
|
|
const char *cfg_get_config_directory() {
|
|
return cfg_get_string_value(CFG_DIRECTORY);
|
|
}
|
|
|
|
int cfg_get_banner_enable() {
|
|
return cfg_get_bool_value(CFG_BANNER_SHOW);
|
|
}
|
|
|
|
int cfg_get_hardware_watch_enable() {
|
|
return cfg_get_bool_value(CFG_HARDWARE_WATCH);
|
|
}
|
|
|
|
unsigned int cfg_get_hardware_refresh_period() {
|
|
return cfg_get_integral_value(CFG_HARDWARE_REFRESH);
|
|
}
|
|
|
|
int cfg_get_watch_cpu() {
|
|
return cfg_get_bool_value(CFG_WATCH_CPU);
|
|
}
|
|
|
|
int cfg_get_watch_memory() {
|
|
return cfg_get_bool_value(CFG_WATCH_MEMORY);
|
|
}
|
|
|
|
int cfg_get_watch_disk() {
|
|
return cfg_get_bool_value(CFG_WATCH_DISK);
|
|
}
|
|
|
|
int cfg_get_watch_sensor() {
|
|
return cfg_get_bool_value(CFG_WATCH_SENSOR);
|
|
}
|
|
|
|
unsigned int cfg_get_cpu_refresh_period() {
|
|
return cfg_get_integral_value(CFG_CPU_REFRESH);
|
|
}
|
|
|
|
unsigned int cfg_get_mem_refresh_period() {
|
|
return cfg_get_integral_value(CFG_MEM_REFRESH);
|
|
}
|
|
|
|
unsigned int cfg_get_disk_refresh_period() {
|
|
return cfg_get_integral_value(CFG_DISK_REFRESH);
|
|
}
|
|
|
|
unsigned int cfg_get_sensor_refresh_period() {
|
|
return cfg_get_integral_value(CFG_SENSOR_REFRESH);
|
|
}
|
|
|
|
const char *cfg_get_redis_server() {
|
|
return cfg_get_string_value(CFG_DB_REDIS_SERVER);
|
|
}
|
|
|
|
int cfg_get_redis_port() {
|
|
return (unsigned short)cfg_get_integral_value(CFG_DB_REDIS_PORT);
|
|
}
|
|
|
|
const char *cfg_get_redis_passwd() {
|
|
return cfg_get_string_value(CFG_DB_REDIS_PASSWD);
|
|
}
|
|
|
|
const char *cfg_get_mysql_server() {
|
|
return cfg_get_string_value(CFG_DB_MYSQL_SERVER);
|
|
}
|
|
|
|
int cfg_get_mysql_port() {
|
|
return (unsigned short)cfg_get_integral_value(CFG_DB_MYSQL_PORT);
|
|
}
|
|
|
|
const char *cfg_get_mysql_user() {
|
|
return cfg_get_string_value(CFG_DB_MYSQL_USER);
|
|
}
|
|
|
|
const char *cfg_get_mysql_passwd() {
|
|
return cfg_get_string_value(CFG_DB_MYSQL_PASSWD);
|
|
}
|
|
|
|
const char *cfg_get_mysql_database() {
|
|
return cfg_get_string_value(CFG_DB_MYSQL_DB_NAME);
|
|
}
|
|
|
|
int cfg_get_zero_mq_port() {
|
|
return (unsigned short)cfg_get_integral_value(CFG_MQ_SVR_PORT);
|
|
}
|
|
|
|
const char *cfg_get_zero_mq_data_path() {
|
|
return cfg_get_string_value(CFG_MQ_DATA_PATH);
|
|
} |