#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/types.h>#include <regex.h>#include "../../mem/shm_mem.h"#include "../../mem/mem.h"#include "../../parser/parse_hname2.h"#include "../../sr_module.h"#include "../../str.h"#include "../../dprint.h"#include "../../error.h"#include "../../ut.h"#include "avpops_parse.h"#include "avpops_impl.h"#include "avpops_db.h"

Go to the source code of this file.
Functions | |
| static int | avpops_child_init (int rank) |
| static int | avpops_init (void) |
| static int | fixup_check_avp (void **param, int param_no) |
| static int | fixup_copy_avp (void **param, int param_no) |
| static int | fixup_db_avp (void **param, int param_no, int allow_scheme) |
| static int | fixup_db_delete_avp (void **param, int param_no) |
| static int | fixup_db_load_avp (void **param, int param_no) |
| static int | fixup_db_query_avp (void **param, int param_no) |
| static int | fixup_db_store_avp (void **param, int param_no) |
| static int | fixup_delete_avp (void **param, int param_no) |
| static int | fixup_is_avp_set (void **param, int param_no) |
| static int | fixup_op_avp (void **param, int param_no) |
| static int | fixup_pushto_avp (void **param, int param_no) |
| static int | fixup_subst (void **param, int param_no) |
| static int | w_check_avps (struct sip_msg *msg, char *param, char *check) |
| static int | w_copy_avps (struct sip_msg *msg, char *param, char *check) |
| static int | w_dbdelete_avps (struct sip_msg *msg, char *source, char *param) |
| static int | w_dbload_avps (struct sip_msg *msg, char *source, char *param) |
| static int | w_dbquery1_avps (struct sip_msg *msg, char *query, char *param) |
| static int | w_dbquery2_avps (struct sip_msg *msg, char *query, char *dest) |
| static int | w_dbstore_avps (struct sip_msg *msg, char *source, char *param) |
| static int | w_delete_avps (struct sip_msg *msg, char *param, char *foo) |
| static int | w_is_avp_set (struct sip_msg *msg, char *param, char *foo) |
| static int | w_op_avps (struct sip_msg *msg, char *param, char *op) |
| static int | w_print_avps (struct sip_msg *msg, char *foo, char *bar) |
| static int | w_pushto_avps (struct sip_msg *msg, char *destination, char *param) |
| static int | w_subst (struct sip_msg *msg, char *src, char *subst) |
Variables | |
| static str | attribute_col = str_init("attribute") |
| static cmd_export_t | cmds [] |
| Exported functions. | |
| static str * | db_columns [6] = {&uuid_col, &attribute_col, &value_col, &type_col, &username_col, &domain_col} |
| static str | db_table = {NULL, 0} |
| static MODULE_VERSION str | db_url = {NULL, 0} |
| static str | domain_col = str_init("domain") |
| struct module_exports | exports |
| static param_export_t | params [] |
| Exported parameters. | |
| static str | type_col = str_init("type") |
| static int | use_domain = 0 |
| static str | username_col = str_init("username") |
| static str | uuid_col = str_init("uuid") |
| static str | value_col = str_init("value") |
| static int avpops_child_init | ( | int | rank | ) | [static] |
Definition at line 198 of file avpops.c.
References avpops_db_init(), PROC_MAIN, PROC_TCP_MAIN, and _str::s.
| static int avpops_init | ( | void | ) | [static] |
Definition at line 163 of file avpops.c.
References avpops_db_bind(), init_store_avps(), _str::len, LM_CRIT, and _str::s.
| static int fixup_check_avp | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
Definition at line 656 of file avpops.c.
References AVPOPS_OP_FM, AVPOPS_OP_RE, avpops_parse_pvar(), AVPOPS_VAL_PVAR, AVPOPS_VAL_STR, E_BAD_RE, E_OUT_OF_MEM, E_UNSPEC, _str::len, LM_DBG, LM_ERR, fis_param::opd, fis_param::ops, parse_check_value(), pkg_free, pkg_malloc, PVT_NULL, _str::s, fis_param::s, s, fis_param::sval, _pv_spec::type, and fis_param::u.
| static int fixup_copy_avp | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
Definition at line 480 of file avpops.c.
References AVPOPS_FLAG_ALL, AVPOPS_FLAG_CASTN, AVPOPS_FLAG_CASTS, AVPOPS_FLAG_DELETE, avpops_parse_pvar(), E_OUT_OF_MEM, E_UNSPEC, LM_ERR, fis_param::ops, PVT_AVP, s, fis_param::sval, _pv_spec::type, and fis_param::u.
| static int fixup_db_avp | ( | void ** | param, | |
| int | param_no, | |||
| int | allow_scheme | |||
| ) | [static] |
Definition at line 211 of file avpops.c.
References AVPOPS_FLAG_DOMAIN0, AVPOPS_FLAG_URI0, AVPOPS_FLAG_USER0, AVPOPS_FLAG_UUID0, AVPOPS_VAL_PVAR, AVPOPS_VAL_STR, E_OUT_OF_MEM, E_UNSPEC, _str::len, LM_ERR, fis_param::opd, parse_avp_db(), pkg_malloc, pv_parse_spec(), PVT_EMPTY, PVT_FROM, PVT_NULL, PVT_OURI, PVT_RURI, PVT_TO, fis_param::s, _str::s, s, fis_param::sval, _pv_spec::type, and fis_param::u.
Referenced by fixup_db_delete_avp(), fixup_db_load_avp(), and fixup_db_store_avp().
| static int fixup_db_delete_avp | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
| static int fixup_db_load_avp | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
| static int fixup_db_query_avp | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
| static int fixup_db_store_avp | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
| static int fixup_delete_avp | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
Definition at line 377 of file avpops.c.
References AVPOPS_FLAG_ALL, avpops_parse_pvar(), AVPOPS_VAL_INT, AVPOPS_VAL_NONE, AVPOPS_VAL_PVAR, AVPOPS_VAL_STR, E_OUT_OF_MEM, E_UNSPEC, _str::len, LM_ERR, fis_param::n, NULL, fis_param::opd, fis_param::ops, pkg_free, pkg_malloc, PVT_AVP, _str::s, s, str2int(), fis_param::sval, fis_param::type, _pv_spec::type, and fis_param::u.
| static int fixup_is_avp_set | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
Definition at line 921 of file avpops.c.
References AVPOPS_FLAG_ALL, AVPOPS_FLAG_CASTN, AVPOPS_FLAG_CASTS, AVPOPS_FLAG_EMPTY, avpops_parse_pvar(), E_OUT_OF_MEM, E_UNSPEC, LM_ERR, fis_param::ops, PVT_AVP, s, fis_param::sval, _pv_spec::type, and fis_param::u.
| static int fixup_op_avp | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
Definition at line 846 of file avpops.c.
References avpops_parse_pvar(), AVPOPS_VAL_PVAR, AVPOPS_VAL_STR, E_OUT_OF_MEM, E_UNSPEC, LM_ERR, NULL, fis_param::opd, parse_op_value(), pkg_free, pkg_malloc, PVT_AVP, s, fis_param::sval, _pv_spec::type, and fis_param::u.
| static int fixup_pushto_avp | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
Definition at line 544 of file avpops.c.
References AVPOPS_FLAG_ALL, AVPOPS_FLAG_DOMAIN0, AVPOPS_FLAG_USER0, avpops_parse_pvar(), AVPOPS_USE_BRANCH, AVPOPS_USE_DURI, AVPOPS_USE_RURI, AVPOPS_VAL_NONE, AVPOPS_VAL_PVAR, E_OUT_OF_MEM, E_UNSPEC, LM_ERR, fis_param::opd, fis_param::ops, pkg_free, PVT_BRANCH, PVT_DSTURI, PVT_HDR, PVT_NULL, PVT_RURI, s, fis_param::sval, _pv_spec::type, and fis_param::u.
| static int fixup_subst | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
Definition at line 725 of file avpops.c.
References AVPOPS_FLAG_ALL, AVPOPS_FLAG_DELETE, avpops_parse_pvar(), AVPOPS_VAL_NONE, E_BAD_RE, E_OUT_OF_MEM, E_UNSPEC, _str::len, LM_DBG, LM_ERR, module_exports::name, NULL, fis_param::opd, fis_param::ops, pkg_free, pkg_malloc, PV_MARKER, PVT_AVP, _str::s, s, subst_parser(), fis_param::sval, _pv_spec::type, and fis_param::u.
| static int w_check_avps | ( | struct sip_msg * | msg, | |
| char * | param, | |||
| char * | check | |||
| ) | [static] |
| static int w_copy_avps | ( | struct sip_msg * | msg, | |
| char * | param, | |||
| char * | check | |||
| ) | [static] |
| static int w_dbdelete_avps | ( | struct sip_msg * | msg, | |
| char * | source, | |||
| char * | param | |||
| ) | [static] |
| static int w_dbload_avps | ( | struct sip_msg * | msg, | |
| char * | source, | |||
| char * | param | |||
| ) | [static] |
| static int w_dbquery1_avps | ( | struct sip_msg * | msg, | |
| char * | query, | |||
| char * | param | |||
| ) | [static] |
| static int w_dbquery2_avps | ( | struct sip_msg * | msg, | |
| char * | query, | |||
| char * | dest | |||
| ) | [static] |
| static int w_dbstore_avps | ( | struct sip_msg * | msg, | |
| char * | source, | |||
| char * | param | |||
| ) | [static] |
| static int w_delete_avps | ( | struct sip_msg * | msg, | |
| char * | param, | |||
| char * | foo | |||
| ) | [static] |
| static int w_is_avp_set | ( | struct sip_msg * | msg, | |
| char * | param, | |||
| char * | foo | |||
| ) | [static] |
| static int w_op_avps | ( | struct sip_msg * | msg, | |
| char * | param, | |||
| char * | op | |||
| ) | [static] |
| static int w_print_avps | ( | struct sip_msg * | msg, | |
| char * | foo, | |||
| char * | bar | |||
| ) | [static] |
| static int w_pushto_avps | ( | struct sip_msg * | msg, | |
| char * | destination, | |||
| char * | param | |||
| ) | [static] |
| static int w_subst | ( | struct sip_msg * | msg, | |
| char * | src, | |||
| char * | subst | |||
| ) | [static] |
str attribute_col = str_init("attribute") [static] |
cmd_export_t cmds[] [static] |
str* db_columns[6] = {&uuid_col, &attribute_col, &value_col, &type_col, &username_col, &domain_col} [static] |
str domain_col = str_init("domain") [static] |
Definition at line 62 of file avpops.c.
Referenced by db_delete_ucontact(), db_delete_urecord(), db_insert_ucontact(), db_load_urecord(), db_update_ucontact(), is_domain_local(), msg_presentity_clean(), preload_udomain(), pres_htable_restore(), query_xcap_update(), and reload_domain_table().
| struct module_exports exports |
param_export_t params[] [static] |
int use_domain = 0 [static] |
str username_col = str_init("username") [static] |
1.5.6