jabberd2
2.2.16
|
module manager More...
Go to the source code of this file.
Functions | |
mm_t | mm_new (sm_t sm) |
allocate a module manager instance, and loads the modules | |
static void | _mm_reaper (const char *module, int modulelen, void *val, void *arg) |
void | mm_free (mm_t mm) |
free a mm instance | |
int | mm_sess_start (mm_t mm, sess_t sess) |
session starting | |
void | mm_sess_end (mm_t mm, sess_t sess) |
session ending | |
mod_ret_t | mm_in_sess (mm_t mm, sess_t sess, pkt_t pkt) |
packets from active session | |
mod_ret_t | mm_in_router (mm_t mm, pkt_t pkt) |
packets from router | |
mod_ret_t | mm_out_sess (mm_t mm, sess_t sess, pkt_t pkt) |
packets to active session | |
mod_ret_t | mm_out_router (mm_t mm, pkt_t pkt) |
packets to router | |
mod_ret_t | mm_pkt_sm (mm_t mm, pkt_t pkt) |
packets for sm | |
mod_ret_t | mm_pkt_user (mm_t mm, user_t user, pkt_t pkt) |
packets for user | |
mod_ret_t | mm_pkt_router (mm_t mm, pkt_t pkt) |
packets from the router | |
int | mm_user_load (mm_t mm, user_t user) |
load user data | |
int | mm_user_unload (mm_t mm, user_t user) |
user data is about to be unloaded | |
int | mm_user_create (mm_t mm, jid_t jid) |
create user | |
void | mm_user_delete (mm_t mm, jid_t jid) |
delete user | |
void | mm_disco_extend (mm_t mm, pkt_t pkt) |
disco extend |
allocate a module manager instance, and loads the modules
Definition at line 47 of file mm.c.
References PATH_MAX, mm_st::sm, sm, mm_st::modules, xhash_new(), nad_find_elem(), sm_st::config, config_st::nad, config_get_one(), log_write(), sm_st::log, nad_find_attr(), NAD_AVAL_L, NAD_AVAL, log_debug, ZONE, chain_SESS_START, mm_st::sess_start, mm_st::nsess_start, chain_SESS_END, mm_st::sess_end, mm_st::nsess_end, chain_IN_SESS, mm_st::in_sess, mm_st::nin_sess, chain_IN_ROUTER, mm_st::in_router, mm_st::nin_router, chain_OUT_SESS, mm_st::out_sess, mm_st::nout_sess, chain_OUT_ROUTER, mm_st::out_router, mm_st::nout_router, chain_PKT_SM, mm_st::pkt_sm, mm_st::npkt_sm, chain_PKT_USER, mm_st::pkt_user, mm_st::npkt_user, chain_PKT_ROUTER, mm_st::pkt_router, mm_st::npkt_router, chain_USER_LOAD, mm_st::user_load, mm_st::nuser_load, chain_USER_UNLOAD, mm_st::user_unload, mm_st::nuser_unload, chain_USER_CREATE, mm_st::user_create, mm_st::nuser_create, chain_USER_DELETE, mm_st::user_delete, mm_st::nuser_delete, chain_DISCO_EXTEND, mm_st::disco_extend, mm_st::ndisco_extend, NAD_CDATA_L, NAD_CDATA, xhash_get(), module_st::mm, module_st::index, mm_st::nindex, module_st::name, module_st::handle, module_st::module_init_fn, xhash_put(), module_st::init, and xhash_zap().
Referenced by _sm_signal_hup(), and JABBER_MAIN().
static void _mm_reaper | ( | const char * | module, |
int | modulelen, | ||
void * | val, | ||
void * | arg | ||
) | [static] |
Definition at line 272 of file mm.c.
References module_st::free, module_st::handle, and module_st::name.
Referenced by mm_free().
void mm_free | ( | mm_t | mm | ) |
free a mm instance
Definition at line 290 of file mm.c.
References xhash_walk(), mm_st::modules, _mm_reaper(), mm_st::sess_start, mm_st::nsess_start, mm_st::sess_end, mm_st::nsess_end, mm_st::in_sess, mm_st::nin_sess, mm_st::in_router, mm_st::nin_router, mm_st::out_sess, mm_st::nout_sess, mm_st::out_router, mm_st::nout_router, mm_st::pkt_sm, mm_st::npkt_sm, mm_st::pkt_user, mm_st::npkt_user, mm_st::pkt_router, mm_st::npkt_router, mm_st::user_load, mm_st::nuser_load, mm_st::user_create, mm_st::nuser_create, mm_st::user_delete, mm_st::nuser_delete, mm_st::disco_extend, mm_st::ndisco_extend, and xhash_free().
Referenced by _sm_signal_hup(), and JABBER_MAIN().
session starting
fire sess-start chain
Definition at line 383 of file mm.c.
References log_debug, ZONE, mm_st::nsess_start, mm_st::sess_start, mod_instance_st::mod, module_st::sess_start, and module_st::name.
Referenced by sess_start().
session ending
fire sess-end chain
Definition at line 414 of file mm.c.
References log_debug, ZONE, mm_st::nsess_end, mm_st::sess_end, mod_instance_st::mod, module_st::sess_end, and module_st::name.
Referenced by _sess_end_guts().
packets from active session
fire in-sess chain
Definition at line 440 of file mm.c.
References mod_PASS, log_debug, ZONE, mm_st::nin_sess, mm_st::in_sess, mod_instance_st::mod, module_st::in_sess, and module_st::name.
Referenced by _session_in_router(), and _sess_end_guts().
packets from router
fire in-router chain
Definition at line 472 of file mm.c.
References mod_PASS, log_debug, ZONE, mm_st::nin_router, mm_st::in_router, mod_instance_st::mod, module_st::in_router, and module_st::name.
Referenced by dispatch().
packets to active session
fire out-sess chain
Definition at line 504 of file mm.c.
References mod_PASS, log_debug, ZONE, mm_st::nout_sess, mm_st::out_sess, mod_instance_st::mod, module_st::out_sess, and module_st::name.
Referenced by pkt_sess().
packets to router
fire out-router chain
Definition at line 535 of file mm.c.
References mod_PASS, log_debug, ZONE, mm_st::nout_router, mm_st::out_router, mod_instance_st::mod, module_st::out_router, and module_st::name.
Referenced by pkt_router().
packets for sm
fire pkt-sm chain
Definition at line 566 of file mm.c.
References log_debug, ZONE, mm_st::npkt_sm, mm_st::pkt_sm, mod_instance_st::mod, module_st::pkt_sm, module_st::name, and mod_PASS.
Referenced by dispatch().
packets for user
fire pkt-user chain
Definition at line 596 of file mm.c.
References mod_PASS, log_debug, ZONE, mm_st::npkt_user, mm_st::pkt_user, mod_instance_st::mod, module_st::pkt_user, and module_st::name.
Referenced by dispatch().
packets from the router
fire pkt-router chain
Definition at line 627 of file mm.c.
References mod_PASS, log_debug, ZONE, mm_st::npkt_router, mm_st::pkt_router, mod_instance_st::mod, module_st::pkt_router, and module_st::name.
Referenced by dispatch().
load user data
fire user-load chain
Definition at line 658 of file mm.c.
References log_debug, ZONE, mm_st::nuser_load, mm_st::user_load, mod_instance_st::mod, module_st::user_load, and module_st::name.
Referenced by user_load().
user data is about to be unloaded
fire user-unload chain
Definition at line 689 of file mm.c.
References log_debug, ZONE, mm_st::nuser_unload, mm_st::user_unload, mod_instance_st::mod, module_st::user_unload, and module_st::name.
Referenced by sess_end().
create user
fire user-create chain
Definition at line 720 of file mm.c.
References log_debug, ZONE, mm_st::nuser_create, mm_st::user_create, mod_instance_st::mod, module_st::user_create, and module_st::name.
Referenced by user_create().
delete user
fire user-delete chain
Definition at line 751 of file mm.c.
References log_debug, ZONE, mm_st::nuser_delete, mm_st::user_delete, mod_instance_st::mod, module_st::user_delete, and module_st::name.
Referenced by user_create(), and user_delete().
disco extend
fire disco-extend chain
Definition at line 777 of file mm.c.
References log_debug, ZONE, mm_st::ndisco_extend, mm_st::disco_extend, mod_instance_st::mod, module_st::disco_extend, and module_st::name.
Referenced by _disco_info_result().