SIP-router utils ::Module: utils. More...
#include "conf.h"#include "../../mem/mem.h"#include "../../mem/shm_mem.h"#include "../../sr_module.h"#include "../../proxy.h"#include <ctype.h>#include <errno.h>#include <limits.h>#include <string.h>#include <stdlib.h>#include <stdio.h>
Go to the source code of this file.
special filter indices
Definition in file conf.c.
| int conf_init | ( | int | max_id | ) |
| struct proxy_l* conf_needs_forward | ( | struct sip_msg * | msg, | |
| int | id | |||
| ) | [read] |
| msg | the SIP message to be forwarded | |
| id | use configuration with this ID when checking |
Definition at line 517 of file conf.c.
References filter_methods_contains_request(), sip_msg::first_line, and sfilter_mask.
Referenced by utils_forward().


| int conf_parse_filter | ( | char * | settings | ) |
| settings | The configuration string in the following form:
* <id>=<filter>[:<filter>]...[,<id>=<filter>[:<filter>]...]... |
Definition at line 405 of file conf.c.
References conf_str2id(), remove_spaces(), and update_filter().
Referenced by forward_fifo_filter().


| int conf_parse_proxy | ( | char * | settings | ) |
| settings,: | The configuration string in the following form:
* <id>=<host>:<port>[,<id>=<host>:<port>]... |
Definition at line 450 of file conf.c.
References conf_str2id(), remove_spaces(), and update_proxy().
Referenced by forward_fifo_proxy().


| int conf_parse_switch | ( | char * | settings | ) |
| settings | the configuration string in the following form:
* <id>=<switch>[,<id>=<switch>]... |
Definition at line 303 of file conf.c.
References conf_str2id(), remove_spaces(), and update_switch().
Referenced by forward_fifo_switch().


| int conf_show | ( | struct mi_root * | rpl_tree | ) |
| rpl_tree | FIFO root |
Definition at line 345 of file conf.c.
References sfilter_mask, and sfilter_str.
Referenced by forward_fifo_list().

| int conf_str2id | ( | char * | id_str | ) |
Definition at line 124 of file conf.c.
References conf_str2int().
Referenced by conf_parse_filter(), conf_parse_proxy(), and conf_parse_switch().


| static int conf_str2int | ( | char * | s | ) | [static] |
Definition at line 99 of file conf.c.
Referenced by conf_str2id(), and update_proxy().

| static int filter_methods_contains_request | ( | int | id, | |
| char * | method, | |||
| int | method_len | |||
| ) | [static] |
| id | use configuration with this ID when checking | |
| method | method string to be searched for | |
| method_len | length of method string |
Definition at line 495 of file conf.c.
Referenced by conf_needs_forward().

| static void remove_spaces | ( | char * | s | ) | [static] |
| s | the string. |
Definition at line 79 of file conf.c.
Referenced by conf_parse_filter(), conf_parse_proxy(), and conf_parse_switch().

| static int update_filter | ( | int | id, | |
| char * | flist | |||
| ) | [static] |
Updates filter configuration. If filter_methods is not NULL, memory is freed. If filter methods are found, memory for the string is allocated, otherwise filter_methods is set to NULL.
| id | update the configuration with this ID. | |
| flist | a list of filter names. |
Definition at line 173 of file conf.c.
References sfilter_mask, and sfilter_str.
Referenced by conf_parse_filter().

| static int update_proxy | ( | int | id, | |
| char * | host_str, | |||
| char * | port_str | |||
| ) | [static] |
| id | update the configuration with this ID. | |
| host_str | the destination host. | |
| port_str | the port number as string. |
Definition at line 243 of file conf.c.
References conf_str2int(), _str::len, and _str::s.
Referenced by conf_parse_proxy().


| static int update_switch | ( | int | id, | |
| char * | param_str | |||
| ) | [static] |
| id | Update the configuration with this ID. | |
| param_str | can be either "off" or "on". |
Definition at line 143 of file conf.c.
Referenced by conf_parse_switch().

1.7.1