#include <curl/curl.h>#include "../../mod_fix.h"#include "../../sr_module.h"#include "../../ut.h"#include "../../forward.h"#include "../../resolve.h"#include "../../locking.h"#include "../../script_cb.h"#include "../../mem/shm_mem.h"#include "functions.h"#include "conf.h"

Go to the source code of this file.
Functions | |
| static void | destroy (void) |
| static void | destroy_shmlock (void) |
| static int | fixup_free_http_query (void **param, int param_no) |
| static int | fixup_http_query (void **param, int param_no) |
| static struct mi_root * | forward_fifo_filter (struct mi_root *cmd_tree, void *param) |
| fifo command for configuring filter | |
| static struct mi_root * | forward_fifo_list (struct mi_root *cmd_tree, void *param) |
| fifo command for listing configuration | |
| static struct mi_root * | forward_fifo_proxy (struct mi_root *cmd_tree, void *param) |
| fifo command for configuring proxy | |
| static struct mi_root * | forward_fifo_switch (struct mi_root *cmd_tree, void *param) |
| fifo command for configuring switch | |
| static int | init_shmlock (void) |
| static int | mod_init (void) |
| static int | pre_script_filter (struct sip_msg *msg, void *unused) |
| int | utils_forward (struct sip_msg *msg, int id, int proto) |
| checks precondition, switch, filter and forwards msg if necessary | |
Variables | |
| static cmd_export_t | cmds [] |
| static gen_lock_t * | conf_lock = NULL |
| struct module_exports | exports |
| static MODULE_VERSION int | forward_active = 0 |
| int | http_query_timeout = 4 |
| static mi_export_t | mi_cmds [] |
| static char * | mp_filter = "" |
| static int | mp_max_id = 0 |
| static char * | mp_proxy = "" |
| static char * | mp_switch = "" |
| static param_export_t | params [] |
| static void destroy | ( | void | ) | [static] |
| static void destroy_shmlock | ( | void | ) | [static] |
| static int fixup_free_http_query | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
Definition at line 252 of file utils/utils.c.
References fixup_free_pvar_null(), LM_ERR, and LM_WARN.
| static int fixup_http_query | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
Definition at line 226 of file utils/utils.c.
References fixup_pvar(), fixup_spve_null(), LM_ERR, LM_INFO, and NULL.
| static struct mi_root * forward_fifo_filter | ( | struct mi_root * | cmd_tree, | |
| void * | param | |||
| ) | [static, read] |
fifo command for configuring filter
Definition at line 390 of file utils/utils.c.
References conf_lock, conf_parse_filter(), init_mi_tree(), mi_node::kids, LM_ERR, MI_BAD_PARM_LEN, MI_BAD_PARM_S, MI_MISSING_PARM_LEN, MI_MISSING_PARM_S, MI_OK_LEN, MI_OK_S, mi_node::next, mi_root::node, NULL, _str::s, and mi_node::value.
| static struct mi_root * forward_fifo_list | ( | struct mi_root * | cmd_tree, | |
| void * | param | |||
| ) | [static, read] |
fifo command for listing configuration
Definition at line 328 of file utils/utils.c.
References addf_mi_node_child(), conf_lock, conf_show(), free_mi_tree(), init_mi_tree(), MI_OK_LEN, MI_OK_S, mi_root::node, and NULL.
| static struct mi_root * forward_fifo_proxy | ( | struct mi_root * | cmd_tree, | |
| void * | param | |||
| ) | [static, read] |
fifo command for configuring proxy
Definition at line 420 of file utils/utils.c.
References conf_lock, conf_parse_proxy(), init_mi_tree(), mi_node::kids, LM_ERR, MI_BAD_PARM_LEN, MI_BAD_PARM_S, MI_MISSING_PARM_LEN, MI_MISSING_PARM_S, MI_OK_LEN, MI_OK_S, mi_node::next, mi_root::node, NULL, _str::s, and mi_node::value.
| static struct mi_root * forward_fifo_switch | ( | struct mi_root * | cmd_tree, | |
| void * | param | |||
| ) | [static, read] |
fifo command for configuring switch
Definition at line 360 of file utils/utils.c.
References conf_lock, conf_parse_switch(), init_mi_tree(), mi_node::kids, LM_ERR, MI_BAD_PARM_LEN, MI_BAD_PARM_S, MI_MISSING_PARM_LEN, MI_MISSING_PARM_S, MI_OK_LEN, MI_OK_S, mi_node::next, mi_root::node, NULL, _str::s, and mi_node::value.
| static int init_shmlock | ( | void | ) | [static] |
| static int mod_init | ( | void | ) | [static] |
Definition at line 160 of file utils/utils.c.
References conf_init(), conf_parse_filter(), conf_parse_proxy(), conf_parse_switch(), forward_active, init_shmlock(), LM_CRIT, LM_ERR, LM_INFO, mp_filter, mp_max_id, mp_proxy, mp_switch, PRE_SCRIPT_CB, pre_script_filter(), register_script_cb(), REQ_TYPE_CB, and RPL_TYPE_CB.
| static int pre_script_filter | ( | struct sip_msg * | msg, | |
| void * | unused | |||
| ) | [static] |
Definition at line 139 of file utils/utils.c.
References PROTO_UDP, and utils_forward().
Referenced by mod_init().
| int utils_forward | ( | struct sip_msg * | msg, | |
| int | id, | |||
| int | proto | |||
| ) |
checks precondition, switch, filter and forwards msg if necessary
| msg | the message to be forwarded | |
| id | use configuration with this ID when checking switch, filter, proxy. | |
| proto | protocol to be used. Should be PROTO_UDP. |
Definition at line 275 of file utils/utils.c.
References proxy_l::addr_idx, sip_msg::buf, conf_lock, conf_needs_forward(), get_next_su(), get_send_socket(), proxy_l::host, hostent2su(), sip_msg::len, LM_DBG, LM_ERR, msg_send(), NULL, pkg_free, pkg_malloc, PKG_MEM_ERROR, proxy_l::port, proxy, sockaddr_union::s, and SIP_PORT.
Referenced by pre_script_filter().
cmd_export_t cmds[] [static] |
Definition at line 83 of file utils/utils.c.
gen_lock_t* conf_lock = NULL [static] |
Definition at line 56 of file utils/utils.c.
Referenced by destroy_shmlock(), forward_fifo_filter(), forward_fifo_list(), forward_fifo_proxy(), forward_fifo_switch(), init_shmlock(), and utils_forward().
| struct module_exports exports |
Definition at line 107 of file utils/utils.c.
MODULE_VERSION int forward_active = 0 [static] |
| int http_query_timeout = 4 |
mi_export_t mi_cmds[] [static] |
Definition at line 98 of file utils/utils.c.
char* mp_filter = "" [static] |
int mp_max_id = 0 [static] |
char* mp_proxy = "" [static] |
char* mp_switch = "" [static] |
param_export_t params[] [static] |
Initial value:
{
{"http_query_timeout", INT_PARAM, &http_query_timeout},
{"forward_active", INT_PARAM, &forward_active},
{0, 0, 0}
}
Definition at line 92 of file utils/utils.c.
1.5.6