
Go to the source code of this file.
Data Structures | |
| struct | tm_callback |
| struct | tmcb_head_list |
| struct | tmcb_params |
| pack structure with all params passed to callback function More... | |
Defines | |
| #define | has_reqin_tmcbs() ( req_in_tmcb_hl->first!=0 ) |
| #define | has_tran_tmcbs(_T_, _types_) ( ((_T_)->tmcb_hl.reg_types)&(_types_) ) |
| #define | TMCB_E2EACK_IN (1<<2) |
| #define | TMCB_LOCAL_COMPLETED (1<<9) |
| #define | TMCB_LOCAL_RESPONSE_OUT (1<<10) |
| #define | TMCB_MAX ((1<<13)-1) |
| #define | TMCB_ON_FAILURE (1<<6) |
| #define | TMCB_ON_FAILURE_RO (1<<5) |
| #define | TMCB_REQUEST_BUILT (1<<11) |
| #define | TMCB_REQUEST_FWDED (1<<3) |
| #define | TMCB_REQUEST_IN (1<<0) |
| #define | TMCB_RESPONSE_FWDED (1<<4) |
| #define | TMCB_RESPONSE_IN (1<<1) |
| #define | TMCB_RESPONSE_OUT (1<<8) |
| #define | TMCB_RESPONSE_PRE_OUT (1<<7) |
| #define | TMCB_TRANS_DELETED (1<<12) |
Typedefs | |
| typedef int(* | register_tmcb_f )(struct sip_msg *p_msg, struct cell *t, int cb_types, transaction_cb f, void *param, release_tmcb_param func) |
| register callback function prototype | |
| typedef void( | release_tmcb_param )(void *param) |
| function to release the callback param | |
| typedef void( | transaction_cb )(struct cell *t, int type, struct tmcb_params *) |
| callback function prototype | |
Functions | |
| void | destroy_tmcb_lists (void) |
| void | empty_tmcb_list (struct tmcb_head_list *head) |
| int | init_tmcb_lists (void) |
| int | insert_tmcb (struct tmcb_head_list *cb_list, int types, transaction_cb f, void *param, release_tmcb_param release_func) |
| Inserts a callback into the a callback list. | |
| int | register_tmcb (struct sip_msg *p_msg, struct cell *t, int types, transaction_cb f, void *param, release_tmcb_param release_func) |
| Register a callback function for several types of events. | |
| void | run_reqin_callbacks (struct cell *trans, struct sip_msg *req, int code) |
| run all REQUEST_IN callbacks | |
| void | run_trans_callbacks (int type, struct cell *trans, struct sip_msg *req, struct sip_msg *rpl, int code) |
| Run all transaction callbacks for an event type. | |
| void | set_extra_tmcb_params (void *extra1, void *extra2) |
| Set extra parameter for tm callback. | |
Variables | |
| struct tmcb_head_list * | req_in_tmcb_hl |
| struct tmcb_head_list | tmcb_pending_hl |
| unsigned int | tmcb_pending_id |
Definition in file t_hooks.h.
| #define has_reqin_tmcbs | ( | ) | ( req_in_tmcb_hl->first!=0 ) |
| #define has_tran_tmcbs | ( | _T_, | |||
| _types_ | ) | ( ((_T_)->tmcb_hl.reg_types)&(_types_) ) |
Definition at line 211 of file t_hooks.h.
Referenced by _reply_light(), cancel_branch(), free_cell(), local_reply(), relay_reply(), run_failure_handlers(), t_forward_nonack(), t_newtran(), t_reply_matching(), and t_should_relay_response().
| #define TMCB_E2EACK_IN (1<<2) |
Definition at line 50 of file t_hooks.h.
Referenced by acc_onreq(), local_reply(), ospOnReq(), ospTmcbFunc(), relay_reply(), t_newtran(), t_reply_matching(), and tmcb_func().
| #define TMCB_LOCAL_COMPLETED (1<<9) |
Definition at line 57 of file t_hooks.h.
Referenced by _reply_light(), local_reply(), ospTmcbFunc(), t_reply_matching(), t_uac(), t_uac_cancel(), and uac_cb().
| #define TMCB_LOCAL_RESPONSE_OUT (1<<10) |
| #define TMCB_MAX ((1<<13)-1) |
| #define TMCB_ON_FAILURE (1<<6) |
Definition at line 54 of file t_hooks.h.
Referenced by acc_onreq(), ospOnReq(), ospTmcbFunc(), reply_callback(), run_failure_handlers(), run_proxy(), t_should_relay_response(), and tmcb_func().
| #define TMCB_ON_FAILURE_RO (1<<5) |
| #define TMCB_REQUEST_BUILT (1<<11) |
Definition at line 59 of file t_hooks.h.
Referenced by cancel_branch(), t_forward_nonack(), and trace_onreq_in().
| #define TMCB_REQUEST_FWDED (1<<3) |
| #define TMCB_REQUEST_IN (1<<0) |
Definition at line 48 of file t_hooks.h.
Referenced by mod_init(), ospInitTm(), and register_tmcb().
| #define TMCB_RESPONSE_FWDED (1<<4) |
Definition at line 52 of file t_hooks.h.
Referenced by dlg_new_dialog(), dlg_onreply(), dlg_onroute(), dlg_seq_down_onreply(), dlg_seq_up_onreply(), ospTmcbFunc(), and relay_reply().
| #define TMCB_RESPONSE_IN (1<<1) |
Definition at line 49 of file t_hooks.h.
Referenced by acc_onreq(), NAT_Keepalive(), ospTmcbFunc(), replace_from(), rr_checker(), t_reply_matching(), t_uac_cancel(), tmcb_func(), and trace_onreq_in().
| #define TMCB_RESPONSE_OUT (1<<8) |
Definition at line 56 of file t_hooks.h.
Referenced by _reply_light(), acc_onreq(), local_reply(), ospOnReq(), ospTmcbFunc(), relay_reply(), reply_callback(), run_proxy(), t_reply_matching(), tmcb_func(), and trace_onreq_in().
| #define TMCB_RESPONSE_PRE_OUT (1<<7) |
Definition at line 55 of file t_hooks.h.
Referenced by _reply_light(), dlg_new_dialog(), local_reply(), relay_reply(), and t_reply_matching().
| #define TMCB_TRANS_DELETED (1<<12) |
Definition at line 60 of file t_hooks.h.
Referenced by dlg_onreply(), free_cell(), uac_cb(), and unref_new_dialog().
| typedef int(* register_tmcb_f)(struct sip_msg *p_msg, struct cell *t, int cb_types, transaction_cb f, void *param, release_tmcb_param func) |
| typedef void( release_tmcb_param)(void *param) |
| typedef void( transaction_cb)(struct cell *t, int type, struct tmcb_params *) |
| void destroy_tmcb_lists | ( | void | ) |
Definition at line 85 of file t_hooks.c.
References empty_tmcb_list(), and shm_free.
Referenced by tm_shutdown().
| void empty_tmcb_list | ( | struct tmcb_head_list * | head | ) |
Definition at line 55 of file t_hooks.c.
References tmcb_head_list::first, tm_callback::next, tm_callback::param, tmcb_head_list::reg_types, tm_callback::release, and shm_free.
Referenced by destroy_tmcb_lists(), free_cell(), and register_tmcb().
| int init_tmcb_lists | ( | void | ) |
Definition at line 71 of file t_hooks.c.
References tmcb_head_list::first, LM_CRIT, tmcb_head_list::reg_types, and shm_malloc().
Referenced by mod_init().
| int insert_tmcb | ( | struct tmcb_head_list * | cb_list, | |
| int | types, | |||
| transaction_cb | f, | |||
| void * | param, | |||
| release_tmcb_param | release_func | |||
| ) |
Inserts a callback into the a callback list.
| cb_list | callback list | |
| types | callback type | |
| f | transaction callback | |
| param | callback parameter | |
| release_func | release function for callback parameter | |
| cb_list | callback list | |
| types | callback type | |
| f | transaction callback | |
| param | callback parameter |
Definition at line 102 of file t_hooks.c.
References tm_callback::callback, E_OUT_OF_MEM, tmcb_head_list::first, tm_callback::id, LM_ERR, tm_callback::next, tm_callback::param, tmcb_head_list::reg_types, tm_callback::release, shm_malloc(), and tm_callback::types.
Referenced by register_tmcb(), t_uac(), and t_uac_cancel().
| int register_tmcb | ( | struct sip_msg * | p_msg, | |
| struct cell * | t, | |||
| int | types, | |||
| transaction_cb | f, | |||
| void * | param, | |||
| release_tmcb_param | release_func | |||
| ) |
Register a callback function for several types of events.
Register a callback function 'f' for 'types' mask of events. This will be called back whenever one of the events occurs in transaction module (global or per transaction, depending of event type).
| p_msg | SIP message | |
| t | transaction | |
| types | ||
| f | callback | |
| param | callback parameter | |
| release_func | release function for callback parameter |
| p_msg | SIP message | |
| t | transaction | |
| types | ||
| f | callback | |
| param | callback parameter | |
| release_func | release function for the callback parameter |
Definition at line 146 of file t_hooks.c.
References E_BUG, E_CFG, empty_tmcb_list(), get_t(), sip_msg::id, insert_tmcb(), LM_CRIT, LM_ERR, NULL, T_UNDEFINED, cell::tmcb_hl, TMCB_MAX, tmcb_pending_id, and TMCB_REQUEST_IN.
Referenced by load_tm().
run all REQUEST_IN callbacks
Definition at line 254 of file t_hooks.c.
References tm_callback::callback, tmcb_params::code, tmcb_params::extra1, tmcb_params::extra2, tmcb_head_list::first, get_t(), tm_callback::id, LM_DBG, tm_callback::next, tm_callback::param, tmcb_params::param, tmcb_params::req, tmcb_params::rpl, set_avp_list(), set_t(), tm_callback::types, and cell::user_avps.
Referenced by build_cell().
| void run_trans_callbacks | ( | int | type, | |
| struct cell * | trans, | |||
| struct sip_msg * | req, | |||
| struct sip_msg * | rpl, | |||
| int | code | |||
| ) |
Run all transaction callbacks for an event type.
| type | callback type | |
| trans | transaction | |
| req | SIP request | |
| rpl | SIP reply | |
| code | callback code |
Definition at line 220 of file t_hooks.c.
References tm_callback::callback, clean_msg_clone(), tmcb_params::code, ua_server::end_request, tmcb_params::extra1, tmcb_params::extra2, tmcb_head_list::first, FL_SHM_CLONE, get_t(), tm_callback::id, LM_DBG, sip_msg::msg_flags, tm_callback::next, tm_callback::param, tmcb_params::param, tmcb_head_list::reg_types, tmcb_params::req, ua_server::request, tmcb_params::rpl, set_avp_list(), set_t(), cell::tmcb_hl, tm_callback::types, cell::uas, and cell::user_avps.
Referenced by _reply_light(), cancel_branch(), free_cell(), local_reply(), pre_print_uac_request(), relay_reply(), run_failure_handlers(), t_forward_nonack(), t_newtran(), and t_reply_matching().
| void set_extra_tmcb_params | ( | void * | extra1, | |
| void * | extra2 | |||
| ) |
Set extra parameter for tm callback.
Definition at line 206 of file t_hooks.c.
References tmcb_params::extra1, and tmcb_params::extra2.
Referenced by _reply_light(), cancel_branch(), relay_reply(), and t_forward_nonack().
| struct tmcb_head_list* req_in_tmcb_hl |
| struct tmcb_head_list tmcb_pending_hl |
| unsigned int tmcb_pending_id |
1.5.6