#include <stdio.h>#include <string.h>#include <sys/time.h>#include "../../ut.h"#include "../../parser/hf.h"#include "../../sr_module.h"#include "../../pvar.h"#include "../../mem/mem.h"#include "ld_session.h"#include "ldap_exp_fn.h"#include "api.h"#include "ldap_connect.h"#include "ldap_api_fn.h"#include "iniparser.h"

Go to the source code of this file.
Defines | |
| #define | DEF_LDAP_CONFIG "/usr/local/etc/kamailio/ldap.cfg" |
Functions | |
| static int | child_init (int rank) |
| static void | destroy (void) |
| static int | ldap_filter_url_encode_fixup (void **param, int param_no) |
| static int | ldap_result_check_fixup (void **param, int param_no) |
| static int | ldap_result_fixup (void **param, int param_no) |
| static int | ldap_search_fixup (void **param, int param_no) |
| static MODULE_VERSION int | mod_init (void) |
| static int | w_ldap_filter_url_encode (struct sip_msg *msg, char *filter_component, char *dst_avp_name) |
| static int | w_ldap_result1 (struct sip_msg *msg, char *src, char *param) |
| static int | w_ldap_result2 (struct sip_msg *msg, char *src, char *subst) |
| static int | w_ldap_result_check_1 (struct sip_msg *msg, char *attr_name_check_str, char *param) |
| static int | w_ldap_result_check_2 (struct sip_msg *msg, char *attr_name_check_str, char *attr_val_re) |
| static int | w_ldap_result_next (struct sip_msg *msg, char *foo, char *bar) |
| static int | w_ldap_search (struct sip_msg *msg, char *ldap_url, char *param) |
Variables | |
| static cmd_export_t | cmds [] |
| static dictionary * | config_vals = NULL |
| struct module_exports | exports |
| str | ldap_config = str_init(DEF_LDAP_CONFIG) |
| static param_export_t | params [] |
| #define DEF_LDAP_CONFIG "/usr/local/etc/kamailio/ldap.cfg" |
Definition at line 86 of file ldap_mod.c.
| static int child_init | ( | int | rank | ) | [static] |
Definition at line 155 of file ldap_mod.c.
References add_ld_session(), iniparser_getnsec(), iniparser_getsecname(), ldap_connect(), ldap_disconnect(), LM_ERR, and NULL.
| static void destroy | ( | void | ) | [static] |
| static int ldap_filter_url_encode_fixup | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
Definition at line 477 of file ldap_mod.c.
References E_OUT_OF_MEM, E_UNSPEC, _str::len, LM_ERR, NULL, pkg_free, pkg_malloc, pv_parse_format(), pv_parse_spec(), PVT_AVP, _str::s, s, and _pv_spec::type.
| static int ldap_result_check_fixup | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
Definition at line 413 of file ldap_mod.c.
References ldap_result_check_params::check_str_elem_p, E_BAD_RE, E_OUT_OF_MEM, E_UNSPEC, ldap_result_check_params::ldap_attr_name, _str::len, LM_ERR, NULL, pkg_malloc, pv_parse_format(), _str::s, s, and subst_parser().
| static int ldap_result_fixup | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
Definition at line 336 of file ldap_mod.c.
References ldap_result_params::dst_avp_spec, ldap_result_params::dst_avp_val_type, E_BAD_RE, E_OUT_OF_MEM, E_UNSPEC, ldap_result_params::ldap_attr_name, _str::len, LM_ERR, NULL, pkg_free, pkg_malloc, pv_parse_spec(), PVT_AVP, _str::s, s, subst_parser(), and _pv_spec::type.
| static int ldap_search_fixup | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
Definition at line 314 of file ldap_mod.c.
References E_CFG, _str::len, LM_ERR, NULL, pv_parse_format(), _str::s, and s.
| static int mod_init | ( | void | ) | [static] |
Definition at line 194 of file ldap_mod.c.
References CFG_N_LDAP_HOST, get_ini_key_name(), iniparser_find_entry(), iniparser_getnsec(), iniparser_getsecname(), iniparser_new(), ldap_get_vendor_version(), LM_ERR, LM_INFO, NULL, and _str::s.
| static int w_ldap_filter_url_encode | ( | struct sip_msg * | msg, | |
| char * | filter_component, | |||
| char * | dst_avp_name | |||
| ) | [static] |
| static int w_ldap_result1 | ( | struct sip_msg * | msg, | |
| char * | src, | |||
| char * | param | |||
| ) | [static] |
| static int w_ldap_result2 | ( | struct sip_msg * | msg, | |
| char * | src, | |||
| char * | subst | |||
| ) | [static] |
| static int w_ldap_result_check_1 | ( | struct sip_msg * | msg, | |
| char * | attr_name_check_str, | |||
| char * | param | |||
| ) | [static] |
| static int w_ldap_result_check_2 | ( | struct sip_msg * | msg, | |
| char * | attr_name_check_str, | |||
| char * | attr_val_re | |||
| ) | [static] |
| static int w_ldap_result_next | ( | struct sip_msg * | msg, | |
| char * | foo, | |||
| char * | bar | |||
| ) | [static] |
| static int w_ldap_search | ( | struct sip_msg * | msg, | |
| char * | ldap_url, | |||
| char * | param | |||
| ) | [static] |
cmd_export_t cmds[] [static] |
Definition at line 97 of file ldap_mod.c.
dictionary* config_vals = NULL [static] |
Definition at line 92 of file ldap_mod.c.
| struct module_exports exports |
Definition at line 139 of file ldap_mod.c.
| str ldap_config = str_init(DEF_LDAP_CONFIG) |
Definition at line 91 of file ldap_mod.c.
param_export_t params[] [static] |
Initial value:
{
{"config_file", STR_PARAM, &ldap_config},
{0, 0, 0}
}
Definition at line 129 of file ldap_mod.c.
1.5.6