jabberd2
2.3.3
|
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 More... | |
static void | _mm_reaper (const char *module, int modulelen, void *val, void *arg) |
void | mm_free (mm_t mm) |
free a mm instance More... | |
int | mm_sess_start (mm_t mm, sess_t sess) |
session starting More... | |
void | mm_sess_end (mm_t mm, sess_t sess) |
session ending More... | |
mod_ret_t | mm_in_sess (mm_t mm, sess_t sess, pkt_t pkt) |
packets from active session More... | |
mod_ret_t | mm_in_router (mm_t mm, pkt_t pkt) |
packets from router More... | |
mod_ret_t | mm_out_sess (mm_t mm, sess_t sess, pkt_t pkt) |
packets to active session More... | |
mod_ret_t | mm_out_router (mm_t mm, pkt_t pkt) |
packets to router More... | |
mod_ret_t | mm_pkt_sm (mm_t mm, pkt_t pkt) |
packets for sm More... | |
mod_ret_t | mm_pkt_user (mm_t mm, user_t user, pkt_t pkt) |
packets for user More... | |
mod_ret_t | mm_pkt_router (mm_t mm, pkt_t pkt) |
packets from the router More... | |
int | mm_user_load (mm_t mm, user_t user) |
load user data More... | |
int | mm_user_unload (mm_t mm, user_t user) |
user data is about to be unloaded More... | |
int | mm_user_create (mm_t mm, jid_t jid) |
create user More... | |
void | mm_user_delete (mm_t mm, jid_t jid) |
delete user More... | |
void | mm_disco_extend (mm_t mm, pkt_t pkt) |
disco extend More... | |
allocate a module manager instance, and loads the modules
Definition at line 47 of file mm.c.
References chain_DISCO_EXTEND, chain_IN_ROUTER, chain_IN_SESS, chain_OUT_ROUTER, chain_OUT_SESS, chain_PKT_ROUTER, chain_PKT_SM, chain_PKT_USER, chain_SESS_END, chain_SESS_START, chain_USER_CREATE, chain_USER_DELETE, chain_USER_LOAD, chain_USER_UNLOAD, sm_st::config, config_get_one(), mm_st::disco_extend, module_st::handle, mm_st::in_router, mm_st::in_sess, module_st::index, module_st::init, sm_st::log, log_debug, log_write(), module_st::mm, module_st::module_init_fn, mm_st::modules, config_st::nad, NAD_AVAL, NAD_AVAL_L, NAD_CDATA, NAD_CDATA_L, nad_find_attr(), nad_find_elem(), module_st::name, mm_st::ndisco_extend, mm_st::nin_router, mm_st::nin_sess, mm_st::nindex, mm_st::nout_router, mm_st::nout_sess, mm_st::npkt_router, mm_st::npkt_sm, mm_st::npkt_user, mm_st::nsess_end, mm_st::nsess_start, mm_st::nuser_create, mm_st::nuser_delete, mm_st::nuser_load, mm_st::nuser_unload, mm_st::out_router, mm_st::out_sess, PATH_MAX, mm_st::pkt_router, mm_st::pkt_sm, mm_st::pkt_user, mm_st::sess_end, mm_st::sess_start, sm, mm_st::sm, mm_st::user_create, mm_st::user_delete, mm_st::user_load, mm_st::user_unload, xhash_get(), xhash_new(), xhash_put(), xhash_zap(), and ZONE.
Referenced by _sm_signal_hup(), and JABBER_MAIN().
|
static |
Definition at line 273 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 291 of file mm.c.
References _mm_reaper(), mm_st::disco_extend, mm_st::in_router, mm_st::in_sess, mm_st::modules, mm_st::ndisco_extend, mm_st::nin_router, mm_st::nin_sess, mm_st::nout_router, mm_st::nout_sess, mm_st::npkt_router, mm_st::npkt_sm, mm_st::npkt_user, mm_st::nsess_end, mm_st::nsess_start, mm_st::nuser_create, mm_st::nuser_delete, mm_st::nuser_load, mm_st::out_router, mm_st::out_sess, mm_st::pkt_router, mm_st::pkt_sm, mm_st::pkt_user, mm_st::sess_end, mm_st::sess_start, mm_st::user_create, mm_st::user_delete, mm_st::user_load, xhash_free(), and xhash_walk().
Referenced by _sm_signal_hup(), and JABBER_MAIN().
session starting
fire sess-start chain
Definition at line 384 of file mm.c.
References log_debug, mod_instance_st::mod, module_st::name, mm_st::nsess_start, mm_st::sess_start, module_st::sess_start, and ZONE.
Referenced by sess_start().
session ending
fire sess-end chain
Definition at line 415 of file mm.c.
References log_debug, mod_instance_st::mod, module_st::name, mm_st::nsess_end, mm_st::sess_end, module_st::sess_end, and ZONE.
Referenced by _sess_end_guts().
packets from active session
fire in-sess chain
Definition at line 441 of file mm.c.
References mm_st::in_sess, module_st::in_sess, log_debug, mod_instance_st::mod, mod_PASS, module_st::name, mm_st::nin_sess, and ZONE.
Referenced by _sess_end_guts(), and _session_in_router().
packets from router
fire in-router chain
Definition at line 473 of file mm.c.
References mm_st::in_router, module_st::in_router, log_debug, mod_instance_st::mod, mod_PASS, module_st::name, mm_st::nin_router, and ZONE.
Referenced by dispatch().
packets to active session
fire out-sess chain
Definition at line 505 of file mm.c.
References log_debug, mod_instance_st::mod, mod_PASS, module_st::name, mm_st::nout_sess, mm_st::out_sess, module_st::out_sess, and ZONE.
Referenced by pkt_sess().
packets to router
fire out-router chain
Definition at line 536 of file mm.c.
References log_debug, mod_instance_st::mod, mod_PASS, module_st::name, mm_st::nout_router, mm_st::out_router, module_st::out_router, and ZONE.
Referenced by pkt_router().
packets for sm
fire pkt-sm chain
Definition at line 567 of file mm.c.
References log_debug, mod_instance_st::mod, mod_PASS, module_st::name, mm_st::npkt_sm, mm_st::pkt_sm, module_st::pkt_sm, and ZONE.
Referenced by dispatch().
packets for user
fire pkt-user chain
Definition at line 597 of file mm.c.
References log_debug, mod_instance_st::mod, mod_PASS, module_st::name, mm_st::npkt_user, mm_st::pkt_user, module_st::pkt_user, and ZONE.
Referenced by dispatch().
packets from the router
fire pkt-router chain
Definition at line 628 of file mm.c.
References log_debug, mod_instance_st::mod, mod_PASS, module_st::name, mm_st::npkt_router, mm_st::pkt_router, module_st::pkt_router, and ZONE.
Referenced by dispatch().
load user data
fire user-load chain
Definition at line 659 of file mm.c.
References log_debug, mod_instance_st::mod, module_st::name, mm_st::nuser_load, mm_st::user_load, module_st::user_load, and ZONE.
Referenced by user_load().
user data is about to be unloaded
fire user-unload chain
Definition at line 690 of file mm.c.
References log_debug, mod_instance_st::mod, module_st::name, mm_st::nuser_unload, mm_st::user_unload, module_st::user_unload, and ZONE.
Referenced by sess_end().
create user
fire user-create chain
Definition at line 721 of file mm.c.
References log_debug, mod_instance_st::mod, module_st::name, mm_st::nuser_create, mm_st::user_create, module_st::user_create, and ZONE.
Referenced by user_create().
delete user
fire user-delete chain
Definition at line 752 of file mm.c.
References log_debug, mod_instance_st::mod, module_st::name, mm_st::nuser_delete, mm_st::user_delete, module_st::user_delete, and ZONE.
Referenced by user_create(), and user_delete().
disco extend
fire disco-extend chain
Definition at line 778 of file mm.c.
References mm_st::disco_extend, module_st::disco_extend, log_debug, mod_instance_st::mod, module_st::name, mm_st::ndisco_extend, and ZONE.
Referenced by _disco_info_result().