redirect.c File Reference

#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"

Include dependency graph for redirect.c:

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 Documentation

#define ACCEPT_RULE_STR   "accept"

Definition at line 56 of file redirect.c.

Referenced by redirect_init().

#define DENY_RULE_STR   "deny"

Definition at line 57 of file redirect.c.

Referenced by redirect_init().


Function Documentation

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]

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]

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]

Definition at line 357 of file redirect.c.

References w_get_redirect2().

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]

Definition at line 326 of file redirect.c.

References add_filter(), DENY_FILTER, and msg_tracer().


Variable Documentation

char* acc_db_table = "acc"

Definition at line 46 of file redirect.c.

Referenced by shmcontact2dset().

char* acc_fct_s = "acc_log_request"

Definition at line 47 of file redirect.c.

Referenced by get_redirect_fixup().

char* accept_filter_s = 0

Definition at line 51 of file redirect.c.

Referenced by redirect_init().

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

Definition at line 52 of file redirect.c.

Referenced by redirect_init().

char* deny_filter_s = 0

Definition at line 50 of file redirect.c.

Referenced by redirect_init().

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().

MODULE_VERSION struct tm_binds rd_tmb

Definition at line 42 of file redirect.c.

Referenced by get_redirect(), and redirect_init().


Generated on Thu May 24 10:00:42 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6