#include <stdio.h>#include <unistd.h>#include <stdlib.h>#include "../../sr_module.h"#include "../../db/db.h"#include "../../mem/shm_mem.h"#include "../../mem/mem.h"#include "../../dprint.h"#include "../../parser/parse_uri.h"#include "../../timer.h"#include "../../ut.h"#include "../../rpc.h"#include "../../action.h"#include "domains.h"#include "pdtree.h"Go to the source code of this file.
|
|
|
|
|
Definition at line 273 of file pdt.c. References _dhash, _ptree, DBG, _pdt_hash::diff_lock, L_ERR, LOG, pdt_db_init(), pdt_free_tree(), PROC_INIT, PROC_MAIN, sync_time, and _pdt_hash::workers. |
|
|
Definition at line 310 of file pdt.c. References _dhash, _ptree, DBG, pdt_db_close(), pdt_free_hash(), and pdt_free_tree(). |
|
|
Definition at line 206 of file pdt.c. References _dhash, _ptree, clean_time, DBG, hs_two_pow, L_ERR, last_sync, _str::len, LOG, MAX_HSIZE_TWO_POW, pdt_clean_cache(), pdt_db_close(), pdt_db_init(), pdt_free_hash(), pdt_free_tree(), pdt_init_hash(), pdt_init_tree(), pdt_load_db(), pdt_print_hash(), pdt_print_tree(), prefix, register_timer(), and _str::s. |
|
||||||||||||
|
Definition at line 562 of file pdt.c. References _dhash, _pd_op::cell, _pd_op::count, DBG, _pdt_hash::diff, _pdt_hash::diff_lock, free_cell(), _pd_op::id, L_ERR, LOG, _pd_op::n, _pd_op::op, _pd_op::p, pd_op_t, and _pdt_hash::workers. Referenced by mod_init(). |
|
|
Definition at line 141 of file pdt.c. References ctx, db_cmd_free(), db_ctx_free(), db_del_domain, db_delete, db_disconnect(), db_insert, and db_load. Referenced by mod_destroy(), mod_init(), and pdt_db_init(). |
|
|
Definition at line 163 of file pdt.c. References ctx, db_add_db(), db_cmd(), db_connect(), db_ctx(), DB_DEL, db_del_domain, db_delete, db_fld_t, DB_GET, db_insert, db_load, DB_PUT, DB_STR, db_table, db_url, ERR, and pdt_db_close(). Referenced by child_init(), and mod_init(). |
|
|
Definition at line 454 of file pdt.c. References _dhash, _ptree, db_exec(), db_first(), db_load, db_next(), DB_NULL, db_rec_t, db_res_free(), db_res_t, ERR, db_fld::flags, db_rec::fld, INFO, db_fld_val::lstr, pdt_add_to_hash(), pdt_add_to_tree(), pdt_check_pd(), STR_FMT, and db_fld::v. Referenced by mod_init(). |
|
|
Definition at line 502 of file pdt.c. References _dhash, _ptree, _pd_op::cell, _pd_op::count, DBG, _pdt_hash::diff, _pdt_hash::diff_lock, _pd::domain, _pd_op::id, _pdt_tree::idsync, L_ERR, LOG, _pdt_hash::max_id, _pd_op::n, _pd_op::op, pd_op_t, PDT_ADD, pdt_add_to_tree(), PDT_DELETE, pdt_remove_from_tree(), and _pd::prefix. Referenced by prefix2domain(). |
|
||||||||||||
|
Definition at line 337 of file pdt.c. References _ptree, DBG, L_ERR, L_INFO, last_sync, _str::len, LOG, parse_sip_msg_uri(), sip_msg::parsed_uri, sip_msg::parsed_uri_ok, pdt_get_domain(), pdt_sync_cache(), prefix, _str::s, str, sync_time, update_new_uri(), and sip_uri::user. Referenced by w_prefix2domain(), and w_prefix2domain_1(). |
|
||||||||||||
|
Definition at line 609 of file pdt.c. References _dhash, db_delete, db_exec(), db_insert, DBG, _pdt_hash::diff, _pdt_hash::diff_lock, rpc::fault, free_cell(), free_pd_op(), _pd_op::id, L_ERR, _str::len, LOG, db_fld_val::lstr, _pdt_hash::max_id, _pd_op::n, new_cell(), new_pd_op(), _pd_op::op, _pd_op::p, pd_op_t, pd_t, PDT_ADD, pdt_add_to_hash(), pdt_check_pd(), rpc_t, _str::s, rpc::scan, str, STR_FMT, db_fld::v, and db_cmd::vals. |
|
||||||||||||
|
Definition at line 719 of file pdt.c. References _dhash, db_del_domain, db_exec(), DBG, _pd::dhash, _pdt_hash::dhash, _pdt_hash::diff, _pdt_hash::diff_lock, _pd::domain, _pd_entry::e, rpc::fault, get_hash_entry, _pdt_hash::hash_size, _pd_op::id, L_ERR, L_INFO, _str::len, _pd_entry::lock, LOG, db_fld_val::lstr, db_cmd::match, _pdt_hash::max_id, _pd_op::n, _pd::n, new_pd_op(), _pd_op::op, _pd_op::p, _pd::p, pd_op_t, pd_t, pdt_compute_hash(), PDT_DELETE, rpc_t, _str::s, rpc::scan, str, and db_fld::v. |
|
||||||||||||
|
Fifo command example:.
--- :pdt_list:[response_file]
Definition at line 835 of file pdt.c. References _dhash, rpc::add, _pdt_hash::dhash, _pdt_hash::diff_lock, _pd::domain, _pd_entry::e, rpc::fault, _pdt_hash::hash_size, L_ERR, _str::len, _pd_entry::lock, LOG, _pd::n, pd_t, pkg_free, pkg_malloc, _pd::prefix, rpc_t, _str::s, rpc::scan, and str. |
|
||||||||||||||||||||
|
Definition at line 407 of file pdt.c. References DBG, do_action(), init_run_actions_ctx, L_ERR, _str::len, LOG, prefix, _str::s, and str. Referenced by prefix2domain(). |
|
||||||||||||||||
|
Definition at line 322 of file pdt.c. References prefix2domain(). |
|
||||||||||||||||
|
Definition at line 327 of file pdt.c. References prefix2domain(). |
|
|
structure containing prefix-domain pairs
Definition at line 70 of file pdt.c. Referenced by child_init(), mod_destroy(), mod_init(), pdt_clean_cache(), pdt_load_db(), pdt_sync_cache(), rpc_add(), rpc_delete(), and rpc_list(). |
|
|
Definition at line 71 of file pdt.c. Referenced by child_init(), mod_destroy(), mod_init(), pdt_load_db(), pdt_sync_cache(), and prefix2domain(). |
|
|
Definition at line 92 of file pdt.c. Referenced by mod_init(). |
|
|
Initial value: {
{"prefix2domain", w_prefix2domain, 0, 0, REQUEST_ROUTE|FAILURE_ROUTE},
{"prefix2domain", w_prefix2domain_1, 1, 0, REQUEST_ROUTE|FAILURE_ROUTE},
{0, 0, 0, 0, 0}
}
|
|
|
database connection
|
|
|
Definition at line 80 of file pdt.c. Referenced by pdt_db_close(), pdt_db_init(), and rpc_delete(). |
|
|
Definition at line 79 of file pdt.c. Referenced by pdt_db_close(), pdt_db_init(), and rpc_add(). |
|
|
Definition at line 78 of file pdt.c. Referenced by pdt_db_close(), pdt_db_init(), and rpc_add(). |
|
|
Definition at line 77 of file pdt.c. Referenced by pdt_db_close(), pdt_db_init(), and pdt_load_db(). |
|
|
|
|
|
parameters
|
|
|
|
|
|
Initial value: {
"pdt",
cmds,
pdt_rpc,
params,
mod_init,
0,
mod_destroy,
0,
child_init
}
|
|
|
Definition at line 67 of file pdt.c. Referenced by mod_init(), and pdt_init_hash(). |
|
|
Definition at line 73 of file pdt.c. Referenced by mod_init(), and prefix2domain(). |
|
|
Initial value: {
{"db_url", PARAM_STRING, &db_url},
{"db_table", PARAM_STRING, &db_table},
{"prefix_column", PARAM_STRING, &prefix_column},
{"domain_column", PARAM_STRING, &domain_column},
{"prefix", PARAM_STR, &prefix},
{"hsize_2pow", PARAM_INT, &hs_two_pow},
{"sync_time", PARAM_INT, &sync_time},
{"clean_time", PARAM_INT, &clean_time},
{0, 0, 0}
}
|
|
|
Initial value: {
{"pdt.add", rpc_add, rpc_add_doc, 0},
{"pdt.delete", rpc_delete, rpc_delete_doc, 0},
{"pdt.list", rpc_list, rpc_list_doc, RET_ARRAY},
{0, 0, 0, 0}
}
|
|
|
pstn prefix
Definition at line 90 of file pdt.c. Referenced by add_route(), attr_hdr_body2attrs(), build_rr(), dump(), ip_set_add_ip_s(), load_gws(), mod_init(), pr_db_load(), prefix2domain(), print_formatting(), print_value(), reload_gws(), rpc_ip_tree_print(), tree_item_add(), and update_new_uri(). |
|
|
|
|
|
Initial value: {
"Add new prefix/domain translation rule.",
0
}
|
|
|
Initial value: {
"Delete prefix/domain translation rule.",
0
}
|
|
|
Initial value: {
"List existin prefix/domain translation rules",
0
}
|
|
|
Definition at line 91 of file pdt.c. Referenced by child_init(), and prefix2domain(). |
1.3.9.1