re_group.h File Reference

Group membership module

More...

#include "../../str.h"
#include "../../parser/msg_parser.h"

Include dependency graph for re_group.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int get_user_group (struct sip_msg *req, char *user, char *avp)
 Get the user group and compare to the regexp list.
int load_re (str *table)
 Load regular expression rules from a database.


Detailed Description

Group membership module

Definition in file re_group.h.


Function Documentation

int get_user_group ( struct sip_msg req,
char *  user,
char *  avp 
)

Get the user group and compare to the regexp list.

Parameters:
req SIP message
user user string
avp AVP value
Returns:
number of all matches (positive), -1 on errors or when not found

Definition at line 154 of file re_group.c.

References domain, EQ_T, _pv_value::flags, get_username_domain(), re_grp::gid, _str::len, LM_DBG, LM_ERR, MAX_URI_SIZE, multiple_gid, int_str::n, re_grp::next, NULL, PV_TYPE_INT, PV_VAL_INT, _pv_spec::pvp, re_grp::re, _pv_value::ri, _str::s, and _pv_spec::setf.

int load_re ( str table  ) 

Load regular expression rules from a database.

Parameters:
table DB table
Returns:
0 on success, -1 on failure

Definition at line 96 of file re_group.c.

References add_re(), DB_INT, DB_STRING, db_func::free_result, group_dbf, group_dbh, db_val_t::int_val, LM_DBG, LM_ERR, db_val_t::nul, NULL, db_func::query, re_exp_column, re_gid_column, RES_ROW_N, db_res::rows, _str::s, db_val_t::string_val, db_val_t::type, db_func::use_table, db_val_t::val, and db_row::values.

Referenced by mod_init().


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