Kannel: Open Source WAP and SMS gateway
svn-r5336
|
#include "gwlib/gwlib.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>
#include "cfg.def"
Go to the source code of this file.
Data Structures | |
struct | CfgGroup |
struct | CfgLoc |
struct | Cfg |
Macros | |
#define | OCTSTR(name) |
#define | SINGLE_GROUP(name, fields) |
#define | MULTI_GROUP(name, fields) |
#define | OCTSTR(name) |
#define | SINGLE_GROUP(name, fields) |
#define | MULTI_GROUP(name, fields) |
#define | OCTSTR(name) printf("%s = <please consult user doc>\n", #name); |
#define | SINGLE_GROUP(name, fields) |
#define | MULTI_GROUP(name, fields) |
Variables | |
static List * | allowed_hooks |
static List * | single_hooks |
#define MULTI_GROUP | ( | name, | |
fields | |||
) |
#define MULTI_GROUP | ( | name, | |
fields | |||
) |
#define MULTI_GROUP | ( | name, | |
fields | |||
) |
#define OCTSTR | ( | name | ) |
#define OCTSTR | ( | name | ) |
#define OCTSTR | ( | name | ) | printf("%s = <please consult user doc>\n", #name); |
#define SINGLE_GROUP | ( | name, | |
fields | |||
) |
#define SINGLE_GROUP | ( | name, | |
fields | |||
) |
#define SINGLE_GROUP | ( | name, | |
fields | |||
) |
Definition at line 260 of file cfg.c.
References cfg, cfg_get, dict_get(), dict_keys(), dict_put(), error(), gwlist_append(), gwlist_create, gwlist_destroy(), gwlist_extract_first(), is_allowed_in_group(), is_single_group(), Cfg::multi_groups, name, octstr_destroy(), octstr_destroy_item(), octstr_get_cstr, octstr_imm(), set_group_name(), Cfg::single_groups, and CfgGroup::vars.
Referenced by cfg_read().
void cfg_add_hooks | ( | void * | allowed, |
void * | single | ||
) |
Definition at line 253 of file cfg.c.
References allowed_hooks, gwlist_append(), and single_hooks.
Referenced by main().
Definition at line 318 of file cfg.c.
References cfg, destroy_group(), destroy_group_list(), dict_create(), Cfg::filename, filename, Cfg::multi_groups, octstr_duplicate, and Cfg::single_groups.
Referenced by at2_read_modems(), bb_graceful_restart(), bb_reload_smsc_groups(), config_reload(), main(), and read_test_ppg_config().
void cfg_destroy | ( | Cfg * | cfg | ) |
Definition at line 331 of file cfg.c.
References cfg, dict_destroy(), Cfg::filename, Cfg::multi_groups, octstr_destroy(), and Cfg::single_groups.
Referenced by at2_read_modems(), bb_reload_smsc_groups(), config_reload(), init_wapbox(), main(), read_ppg_config(), and read_test_ppg_config().
void cfg_dump | ( | Cfg * | cfg | ) |
Definition at line 835 of file cfg.c.
References cfg, cfg_get_multi_group(), cfg_get_single_group(), debug(), dict_keys(), Cfg::filename, grp_dump(), gwlist_destroy(), gwlist_extract_first(), Cfg::multi_groups, name, octstr_destroy(), octstr_get_cstr, and Cfg::single_groups.
Referenced by init_wapbox(), main(), and read_test_ppg_config().
void cfg_dump_all | ( | void | ) |
Definition at line 759 of file cfg.c.
References cfg_get, octstr_case_compare(), octstr_destroy(), octstr_imm(), and warning().
Referenced by at2_read_modems(), config_reload(), create_onetrans(), httpadmin_start(), init_bearerbox(), init_reroute(), init_smppbox(), init_smsbox(), init_sqlbox(), init_wapbox(), read_ppg_config(), read_test_ppg_config(), smsbox_start(), smsc2_start(), smsc_at2_create(), smsc_cimd2_create(), smsc_http_create(), smsc_oisd_create(), smsc_smpp_create(), smsc_soap_create(), smscconn_create(), and wapbox_start().
Definition at line 716 of file cfg.c.
References CfgGroup::configfile, and octstr_duplicate.
Referenced by smsc_at2_create().
Definition at line 666 of file cfg.c.
References dict_get(), dict_keys(), gwlist_append(), gwlist_create, gwlist_delete_equal(), gwlist_destroy(), gwlist_extract_first(), gwlist_search(), gwlist_sort(), md5(), CfgGroup::name, octstr_append(), octstr_cmp_cb(), octstr_destroy(), octstr_duplicate, octstr_get_cstr, octstr_sort_cb(), panic, and CfgGroup::vars.
Referenced by cmp_conn_grp_checksum(), cmp_rout_grp_checksum(), smscconn_create(), and smscconn_reconfig().
Definition at line 661 of file cfg.c.
References CfgGroup::name, and octstr_duplicate.
Referenced by create_onetrans().
Definition at line 742 of file cfg.c.
References cfg_get, octstr_destroy(), and octstr_parse_long().
Referenced by at2_read_modems(), check_config(), config_reload(), create_onetrans(), dlr_db_fields_create(), generic_get_field_map(), httpadmin_start(), init_bearerbox(), init_configuration(), init_smppbox(), init_smsbox(), init_sqlbox(), init_wapbox(), radius_acct_init(), read_ppg_config(), read_test_ppg_config(), smpp_pdu_init(), smsbox_start(), smsc2_start(), smsc_at2_create(), smsc_cgw_create(), smsc_cimd2_create(), smsc_emi2_create(), smsc_fake_create(), smsc_http_create(), smsc_oisd_create(), smsc_open(), smsc_smpp_create(), smsc_soap_create(), smscconn_create(), smscconn_instances(), and wapbox_start().
Definition at line 790 of file cfg.c.
References cfg_get, octstr_destroy(), and octstr_split_words().
Referenced by config_reload(), init_bearerbox(), and init_smsbox().
Definition at line 645 of file cfg.c.
References cfg, dict_get(), gwlist_append(), gwlist_create, gwlist_get(), gwlist_len(), Cfg::multi_groups, and name.
Referenced by at2_read_modems(), bb_reload_smsc_groups(), cfg_dump(), config_reload(), init_bearerbox(), init_smsbox_routes(), init_smsc_routes(), read_ppg_config(), smpp_pdu_init(), smsbox_req_sendota(), smsc2_graceful_restart(), smsc2_start(), and urltrans_add_cfg().
Octstr* cfg_get_real | ( | CfgGroup * | grp, |
Octstr * | varname, | ||
const char * | file, | ||
long | line, | ||
const char * | func | ||
) |
Definition at line 722 of file cfg.c.
References dict_get(), file, is_allowed_in_group(), CfgGroup::name, octstr_duplicate, octstr_get_cstr, panic, and CfgGroup::vars.
Definition at line 639 of file cfg.c.
References cfg, dict_get(), name, and Cfg::single_groups.
Referenced by cfg_dump(), check_config(), config_reload(), dlr_init(), dlr_init_spool(), httpadmin_start(), init_bearerbox(), init_smppbox(), init_smsbox(), init_sqlbox(), init_wapbox(), read_ppg_config(), read_test_ppg_config(), smsbox_start(), smsc2_start(), udp_start(), and wapbox_start().
void cfg_init | ( | void | ) |
Definition at line 887 of file cfg.c.
References allowed_hooks, core_is_allowed_in_group(), core_is_single_group(), gwlist_append(), gwlist_create, and single_hooks.
Referenced by gwlib_init().
int cfg_read | ( | Cfg * | cfg | ) |
Definition at line 452 of file cfg.c.
References add_group(), cfg, cfg_set(), cfgloc_create(), cfgloc_destroy(), CfgGroup::configfile, create_group(), debug(), destroy_group(), error(), expand_file(), file, CfgLoc::filename, Cfg::filename, filename, gwlist_create, gwlist_destroy(), gwlist_extract_first(), gwlist_insert(), gwlist_search(), CfgLoc::line, CfgLoc::line_no, lines, name, octstr_append_cstr(), octstr_copy, octstr_destroy(), octstr_destroy_item(), octstr_duplicate, octstr_get_char(), octstr_get_cstr, octstr_imm(), octstr_item_match(), octstr_len(), octstr_search(), octstr_search_char(), octstr_strip_blanks(), panic, and parse_value().
Referenced by at2_read_modems(), bb_graceful_restart(), bb_reload_smsc_groups(), config_reload(), main(), and read_test_ppg_config().
Definition at line 805 of file cfg.c.
References dict_put(), octstr_duplicate, and CfgGroup::vars.
Referenced by cfg_read().
void cfg_shutdown | ( | void | ) |
Definition at line 898 of file cfg.c.
References allowed_hooks, gwlist_destroy(), and single_hooks.
Referenced by gwlib_shutdown().
Definition at line 114 of file cfg.c.
References CfgLoc::filename, filename, CfgLoc::line, CfgLoc::line_no, and octstr_duplicate.
Referenced by cfg_read(), and expand_file().
|
static |
Definition at line 126 of file cfg.c.
References CfgLoc::filename, CfgLoc::line, and octstr_destroy().
Referenced by cfg_read().
Definition at line 180 of file cfg.c.
References octstr_imm().
Referenced by cfg_init().
|
static |
|
static |
Definition at line 81 of file cfg.c.
References CfgGroup::configfile, dict_create(), CfgGroup::line, CfgGroup::name, octstr_destroy_item(), and CfgGroup::vars.
Referenced by cfg_read().
|
static |
Definition at line 93 of file cfg.c.
References CfgGroup::configfile, dict_destroy(), CfgGroup::name, octstr_destroy(), and CfgGroup::vars.
Referenced by cfg_create(), cfg_read(), and destroy_group_list().
|
static |
Definition at line 136 of file cfg.c.
References destroy_group(), and gwlist_destroy().
Referenced by cfg_create().
Definition at line 389 of file cfg.c.
References cfgloc_create(), file, gwlist_append(), gwlist_create, gwlist_destroy(), gwlist_extract_first(), gwlist_insert(), CfgLoc::line, CfgLoc::line_no, lines, octstr_append(), octstr_create, octstr_delete(), octstr_destroy(), octstr_destroy_item(), octstr_get_char(), octstr_get_cstr, octstr_imm(), octstr_len(), octstr_read_file(), and octstr_split().
Referenced by cfg_read().
void grp_dump | ( | CfgGroup * | grp | ) |
Definition at line 811 of file cfg.c.
References cfg_get, debug(), dict_keys(), gwlist_destroy(), gwlist_extract_first(), CfgGroup::name, name, octstr_destroy(), octstr_get_cstr, and CfgGroup::vars.
Referenced by cfg_dump(), create_onetrans(), init_reroute(), init_smsbox_routes(), and init_smsc_routes().
Definition at line 224 of file cfg.c.
References allowed_hooks, gwlist_get(), and gwlist_len().
Referenced by add_group(), and cfg_get_real().
|
static |
Definition at line 239 of file cfg.c.
References gwlist_get(), gwlist_len(), and single_hooks.
Referenced by add_group().
|
static |
Definition at line 158 of file cfg.c.
References octstr_compare().
Referenced by cfg_get_group_checksum().
|
static |
Definition at line 149 of file cfg.c.
References octstr_compare().
Referenced by cfg_get_group_checksum().
|
static |
Definition at line 342 of file cfg.c.
References octstr_append_char(), octstr_delete(), octstr_destroy(), octstr_duplicate, octstr_get_char(), octstr_len(), octstr_strip_blanks(), and octstr_truncate().
Referenced by cfg_read().
Definition at line 142 of file cfg.c.
References CfgGroup::name, name, octstr_destroy(), and octstr_duplicate.
Referenced by add_group().
|
static |
Definition at line 177 of file cfg.c.
Referenced by cfg_add_hooks(), cfg_init(), cfg_shutdown(), and is_allowed_in_group().
|
static |
Definition at line 178 of file cfg.c.
Referenced by cfg_add_hooks(), cfg_init(), cfg_shutdown(), and is_single_group().