#include <sys/types.h>#include <regex.h>#include "../../sr_module.h"#include "../../str.h"#include "../../dprint.h"#include "../../mem/mem.h"#include "../tm/tm_load.h"#include "rd_funcs.h"#include "rd_filter.h"

Go to the source code of this file.
Defines | |
| #define | ACCEPT_RULE_STR "accept" |
| #define | DENY_RULE_STR "deny" |
Functions | |
| int | get_nr_max (char *s, unsigned char *max) |
| static int | get_redirect_fixup (void **param, int param_no) |
| static void | msg_tracer (struct sip_msg *msg, int reset) |
| static int | redirect_init (void) |
| static int | regexp_compile (char *re_s, regex_t **re) |
| static int | setf_fixup (void **param, int param_no) |
| static int | w_get_redirect1 (struct sip_msg *msg, char *dir, char *foo) |
| static int | w_get_redirect2 (struct sip_msg *msg, char *dir, char *foo) |
| static int | w_set_accept (struct sip_msg *msg, char *dir, char *foo) |
| static int | w_set_deny (struct sip_msg *msg, char *dir, char *foo) |
Variables | |
| char * | acc_db_table = "acc" |
| char * | acc_fct_s = "acc_log_request" |
| char * | accept_filter_s = 0 |
| unsigned int | bflags = 0 |
| static cmd_export_t | cmds [] |
| char * | def_filter_s = 0 |
| char * | deny_filter_s = 0 |
| struct module_exports | exports |
| static param_export_t | params [] |
| cmd_function | rd_acc_fct = 0 |
| MODULE_VERSION struct tm_binds | rd_tmb |
| #define ACCEPT_RULE_STR "accept" |
| #define DENY_RULE_STR "deny" |
| int get_nr_max | ( | char * | s, | |
| unsigned char * | max | |||
| ) |
Definition at line 111 of file redirect.c.
References LM_ERR, and str2s().
Referenced by get_redirect_fixup().
| static int get_redirect_fixup | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
Definition at line 138 of file redirect.c.
References acc_fct_s, E_UNSPEC, find_export(), get_nr_max(), _str::len, LM_ERR, pkg_free, pkg_malloc, rd_acc_fct, acc_param::reason, REQUEST_ROUTE, _str::s, and s.
| static void msg_tracer | ( | struct sip_msg * | msg, | |
| int | reset | |||
| ) | [inline, static] |
Definition at line 304 of file redirect.c.
References sip_msg::id, LM_WARN, and reset_filters().
Referenced by w_get_redirect2(), w_set_accept(), and w_set_deny().
| static int redirect_init | ( | void | ) | [static] |
Definition at line 260 of file redirect.c.
References ACCEPT_FILTER, accept_filter_s, ACCEPT_RULE, ACCEPT_RULE_STR, add_default_filter(), def_filter_s, DENY_FILTER, deny_filter_s, DENY_RULE, DENY_RULE_STR, init_filters(), LM_ERR, load_tm_api(), rd_tmb, regexp_compile(), and set_default_rule().
| static int regexp_compile | ( | char * | re_s, | |
| regex_t ** | re | |||
| ) | [static] |
Definition at line 240 of file redirect.c.
References E_BAD_RE, E_OUT_OF_MEM, LM_ERR, pkg_free, and pkg_malloc.
Referenced by redirect_init(), and setf_fixup().
| static int setf_fixup | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
Definition at line 203 of file redirect.c.
References E_BAD_RE, E_UNSPEC, LM_ERR, pkg_free, regexp_compile(), RESET_ADDED, RESET_DEFAULT, and s.
| static int w_get_redirect1 | ( | struct sip_msg * | msg, | |
| char * | dir, | |||
| char * | foo | |||
| ) | [static] |
| static int w_get_redirect2 | ( | struct sip_msg * | msg, | |
| char * | dir, | |||
| char * | foo | |||
| ) | [static] |
Definition at line 340 of file redirect.c.
References bflags, get_redirect(), max, msg_tracer(), and reset_filters().
Referenced by w_get_redirect1().
| static int w_set_accept | ( | struct sip_msg * | msg, | |
| char * | dir, | |||
| char * | foo | |||
| ) | [static] |
Definition at line 333 of file redirect.c.
References ACCEPT_FILTER, add_filter(), and msg_tracer().
| static int w_set_deny | ( | struct sip_msg * | msg, | |
| char * | dir, | |||
| char * | foo | |||
| ) | [static] |
| char* acc_db_table = "acc" |
| char* acc_fct_s = "acc_log_request" |
| char* accept_filter_s = 0 |
| unsigned int bflags = 0 |
Definition at line 54 of file redirect.c.
Referenced by cpl_proxy_to_loc_set(), and w_get_redirect2().
cmd_export_t cmds[] [static] |
Definition at line 71 of file redirect.c.
| char* def_filter_s = 0 |
| char* deny_filter_s = 0 |
| struct module_exports exports |
Definition at line 94 of file redirect.c.
param_export_t params[] [static] |
Definition at line 83 of file redirect.c.
Definition at line 43 of file redirect.c.
Referenced by get_redirect_fixup(), and shmcontact2dset().
1.5.6