#include "../../mi/mi.h"#include "../../parser/msg_parser.h"#include "../../proxy.h"


Go to the source code of this file.
Functions | |
| void | conf_destroy (void) |
| Destroy configuration. | |
| int | conf_init (int max_id) |
| Initialize configuration. | |
| struct proxy_l * | conf_needs_forward (struct sip_msg *msg, int id) |
| Checks forwarding is needed. | |
| int | conf_parse_filter (char *settings) |
| Parses a configuration string for the filter Parses a configuration string for switch settings and updates the configuration structure. | |
| int | conf_parse_proxy (char *settings) |
| Parses a configuration string for proxy settings Parses a configuration string for proxy settings and updates the configuration structure. | |
| int | conf_parse_switch (char *settings) |
| Parses configuration string for the switch Parses a configuration string for switch settings and updates the configuration structure. | |
| int | conf_show (struct mi_root *rpl_tree) |
| Output configuration in FIFO format. | |
| int | conf_str2id (char *id_str) |
| Converts string to integer and checks for validity. | |
| void conf_destroy | ( | void | ) |
Destroy configuration.
Definition at line 556 of file conf.c.
References fwd_setting::active, free_shm_proxy(), fwd_max_id, id, proxy, and shm_free.
| int conf_init | ( | int | max_id | ) |
Initialize configuration.
| max_id | number of configuration statements |
Definition at line 539 of file conf.c.
References fwd_max_id, NULL, shm_malloc(), and SHM_MEM_ERROR.
Referenced by mod_init().
Checks forwarding is needed.
| msg | the SIP message to be forwarded | |
| id | use configuration with this ID when checking |
Definition at line 508 of file conf.c.
References filter_methods_contains_request(), sip_msg::first_line, NULL, fwd_setting::proxy, msg_start::request, sfidx_reply, sfidx_request, sfilter_mask, SIP_REPLY, SIP_REQUEST, msg_start::type, and msg_start::u.
Referenced by utils_forward().
| int conf_parse_filter | ( | char * | settings | ) |
Parses a configuration string for the filter Parses a configuration string for switch settings and updates the configuration structure.
| settings | The configuration string in the following form: <id>=<filter>[:<filter>]...[,<id>=<filter>[:<filter>]...]... |
Definition at line 398 of file conf.c.
References conf_str2id(), len, LM_ERR, NULL, pkg_free, pkg_malloc, PKG_MEM_ERROR, remove_spaces(), and update_filter().
Referenced by forward_fifo_filter(), and mod_init().
| int conf_parse_proxy | ( | char * | settings | ) |
Parses a configuration string for proxy settings Parses a configuration string for proxy settings and updates the configuration structure.
| settings,: | The configuration string in the following form: <id>=<host>:<port>[,<id>=<host>:<port>]... |
Definition at line 441 of file conf.c.
References conf_str2id(), len, LM_ERR, NULL, pkg_free, pkg_malloc, PKG_MEM_ERROR, remove_spaces(), and update_proxy().
Referenced by forward_fifo_proxy(), and mod_init().
| int conf_parse_switch | ( | char * | settings | ) |
Parses configuration string for the switch Parses a configuration string for switch settings and updates the configuration structure.
| settings | the configuration string in the following form: <id>=<switch>[,<id>=<switch>]... |
Definition at line 298 of file conf.c.
References conf_str2id(), len, LM_ERR, NULL, pkg_free, pkg_malloc, PKG_MEM_ERROR, remove_spaces(), and update_switch().
Referenced by forward_fifo_switch(), and mod_init().
| int conf_show | ( | struct mi_root * | rpl_tree | ) |
Output configuration in FIFO format.
| rpl_tree | FIFO root |
Definition at line 340 of file conf.c.
References fwd_setting::active, addf_mi_node_child(), buf, BUFSIZE, fwd_max_id, id, proxy_l::name, mi_root::node, NULL, proxy_l::port, fwd_setting::proxy, _str::s, sfilter_cnt, sfilter_mask, sfilter_str, and snprintf.
Referenced by forward_fifo_list().
| int conf_str2id | ( | char * | id_str | ) |
Converts string to integer and checks for validity.
Definition at line 121 of file conf.c.
References conf_str2int(), fwd_max_id, and LM_ERR.
Referenced by conf_parse_filter(), conf_parse_proxy(), and conf_parse_switch().
1.5.6