#include "sr_module.h"
#include "dprint.h"
#include "error.h"
#include "mem/mem.h"
#include "pt.h"
#include <strings.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.
Functions | |
| int | count_module_procs (void) |
| Counts the additional the number of processes requested by modules. | |
| void | destroy_modules (void) |
| cmd_export_t * | find_cmd_export_t (char *name, int param_no, int flags) |
| cmd_function | find_export (char *name, int param_no, int flags) |
| cmd_function | find_mod_export (char *mod, char *name, int param_no, int flags) |
| void * | find_param_export (char *mod, char *name, modparam_t type) |
| Find a parameter with given type and return it's address in memory If there is no such parameter, NULL is returned. | |
| int | init_child (int rank) |
| static int | init_mod (struct sr_module *m) |
| static int | init_mod_child (struct sr_module *m, int rank, char *type) |
| int | init_modules (void) |
| int | module_loaded (char *name) |
| Check if module is loaded. | |
| int | register_module (struct module_exports *e, char *path, void *handle) |
| int | sr_load_module (char *path) |
| int | start_module_procs (void) |
| Forks and starts the additional processes required by modules. | |
| static int | version_control (void *handle, char *path) |
Variables | |
| struct sr_module * | modules = 0 |
Definition in file sr_module.c.
| int count_module_procs | ( | void | ) |
Counts the additional the number of processes requested by modules.
Definition at line 468 of file sr_module.c.
References sr_module::exports, proc_export_::function, LM_DBG, proc_export_::name, sr_module::next, proc_export_::no, and module_exports::procs.
Referenced by init_multi_proc_support().
| void destroy_modules | ( | void | ) |
Definition at line 312 of file sr_module.c.
References module_exports::destroy_f, sr_module::exports, LM_DBG, module_exports::name, sr_module::next, and pkg_free.
Referenced by cleanup().
| cmd_export_t* find_cmd_export_t | ( | char * | name, | |
| int | param_no, | |||
| int | flags | |||
| ) |
Definition at line 234 of file sr_module.c.
References module_exports::cmds, sr_module::exports, cmd_export_::flags, LM_DBG, module_exports::name, cmd_export_::name, sr_module::next, cmd_export_::param_no, and sr_module::path.
Referenced by find_export().
| cmd_function find_export | ( | char * | name, | |
| int | param_no, | |||
| int | flags | |||
| ) |
Definition at line 217 of file sr_module.c.
References find_cmd_export_t(), and cmd_export_::function.
Referenced by cpl_init(), get_redirect_fixup(), init(), load_bm_api(), load_dlg_api(), load_ldap_api(), load_qos_api(), load_rr_api(), load_sl_api(), load_textops_api(), load_tm_api(), load_xjab(), mod_init(), ospInitMod(), registerForUSRLOCCallbacks(), and seas_init().
| cmd_function find_mod_export | ( | char * | mod, | |
| char * | name, | |||
| int | param_no, | |||
| int | flags | |||
| ) |
Definition at line 262 of file sr_module.c.
References module_exports::cmds, sr_module::exports, cmd_export_::flags, cmd_export_::function, LM_DBG, cmd_export_::name, module_exports::name, sr_module::next, cmd_export_::param_no, and sr_module::path.
Referenced by db_bind_mod().
| void* find_param_export | ( | char * | mod, | |
| char * | name, | |||
| modparam_t | type | |||
| ) |
Find a parameter with given type and return it's address in memory If there is no such parameter, NULL is returned.
Definition at line 289 of file sr_module.c.
References sr_module::exports, LM_DBG, param_export_::name, module_exports::name, sr_module::next, param_export_::param_pointer, module_exports::params, sr_module::path, and param_export_::type.
Referenced by mod_init().
| int init_child | ( | int | rank | ) |
Definition at line 368 of file sr_module.c.
References init_mod_child(), PROC_MAIN, PROC_TCP_MAIN, and PROC_TIMER.
Referenced by main_loop(), and start_timer_processes().
| static int init_mod | ( | struct sr_module * | m | ) | [static] |
Definition at line 397 of file sr_module.c.
References sr_module::exports, module_exports::init_f, LM_DBG, LM_ERR, LM_INFO, module_exports::mi_cmds, module_exports::name, sr_module::next, register_mi_mod(), register_module_stats, and module_exports::stats.
Referenced by init_modules().
| static int init_mod_child | ( | struct sr_module * | m, | |
| int | rank, | |||
| char * | type | |||
| ) | [static] |
Definition at line 335 of file sr_module.c.
References sr_module::exports, module_exports::init_child_f, LM_DBG, LM_ERR, module_exports::name, and sr_module::next.
Referenced by init_child().
| int init_modules | ( | void | ) |
| int module_loaded | ( | char * | name | ) |
Check if module is loaded.
Definition at line 452 of file sr_module.c.
References sr_module::exports, module_exports::name, and sr_module::next.
Referenced by handle_openserSIPProxyAuthMethod(), handle_openserSIPProxyRecordRoute(), handle_openserSIPProxyStatefulness(), init_openserSIPMethodSupportedTable(), and mod_init().
| int register_module | ( | struct module_exports * | e, | |
| char * | path, | |||
| void * | handle | |||
| ) |
Definition at line 58 of file sr_module.c.
References E_OUT_OF_MEM, sr_module::exports, sr_module::handle, module_exports::items, LM_DBG, LM_ERR, module_exports::name, sr_module::next, sr_module::path, pkg_free, pkg_malloc, and register_pvars_mod().
Referenced by sr_load_module().
| int sr_load_module | ( | char * | path | ) |
Definition at line 144 of file sr_module.c.
References DEFAULT_DLFLAGS, module_exports::dlflags, sr_module::handle, KAMAILIO_DLFLAGS, LM_DBG, LM_ERR, LM_WARN, sr_module::next, register_module(), and version_control().
| int start_module_procs | ( | void | ) |
Forks and starts the additional processes required by modules.
Definition at line 486 of file sr_module.c.
References sr_module::exports, proc_export_::function, internal_fork(), LM_DBG, LM_ERR, module_exports::name, proc_export_::name, sr_module::next, proc_export_::no, NULL, proc_export_::post_fork_function, proc_export_::pre_fork_function, and module_exports::procs.
Referenced by main_loop().
| static int version_control | ( | void * | handle, | |
| char * | path | |||
| ) | [inline, static] |
Definition at line 99 of file sr_module.c.
References KAMAILIO_COMPILE_FLAGS, KAMAILIO_FULL_VERSION, LM_CRIT, and LM_ERR.
Referenced by sr_load_module().
Definition at line 53 of file sr_module.c.
Referenced by forward_reply(), and set_mod_param_regex().
1.5.6