jabberd2  2.2.17
Functions
mm.c File Reference

module manager More...

#include "sm.h"
#include <dlfcn.h>

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

Detailed Description

module manager

Author:
Robert Norris
Date:
2005/08/17 07:48:28
Revision:
1.40

Definition in file mm.c.


Function Documentation

mm_t mm_new ( sm_t  sm)
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)
int mm_sess_start ( mm_t  mm,
sess_t  sess 
)

session starting

fire sess-start chain

Definition at line 383 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().

void mm_sess_end ( mm_t  mm,
sess_t  sess 
)

session ending

fire sess-end chain

Definition at line 414 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().

mod_ret_t mm_in_sess ( mm_t  mm,
sess_t  sess,
pkt_t  pkt 
)

packets from active session

fire in-sess chain

Definition at line 440 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().

mod_ret_t mm_in_router ( mm_t  mm,
pkt_t  pkt 
)

packets from router

fire in-router chain

Definition at line 472 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().

mod_ret_t mm_out_sess ( mm_t  mm,
sess_t  sess,
pkt_t  pkt 
)

packets to active session

fire out-sess chain

Definition at line 504 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().

mod_ret_t mm_out_router ( mm_t  mm,
pkt_t  pkt 
)

packets to router

fire out-router chain

Definition at line 535 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().

mod_ret_t mm_pkt_sm ( mm_t  mm,
pkt_t  pkt 
)

packets for sm

fire pkt-sm chain

Definition at line 566 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().

mod_ret_t mm_pkt_user ( mm_t  mm,
user_t  user,
pkt_t  pkt 
)

packets for user

fire pkt-user chain

Definition at line 596 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().

mod_ret_t mm_pkt_router ( mm_t  mm,
pkt_t  pkt 
)

packets from the router

fire pkt-router chain

Definition at line 627 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().

int mm_user_load ( mm_t  mm,
user_t  user 
)

load user data

fire user-load chain

Definition at line 658 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().

int mm_user_unload ( mm_t  mm,
user_t  user 
)

user data is about to be unloaded

fire user-unload chain

Definition at line 689 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().

int mm_user_create ( mm_t  mm,
jid_t  jid 
)

create user

fire user-create chain

Definition at line 720 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().

void mm_user_delete ( mm_t  mm,
jid_t  jid 
)

delete user

fire user-delete chain

Definition at line 751 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().

void mm_disco_extend ( mm_t  mm,
pkt_t  pkt 
)

disco extend

fire disco-extend chain

Definition at line 777 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().