avpops_impl.c File Reference

#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <regex.h>
#include <fnmatch.h>
#include "../../ut.h"
#include "../../dprint.h"
#include "../../usr_avp.h"
#include "../../action.h"
#include "../../ip_addr.h"
#include "../../config.h"
#include "../../dset.h"
#include "../../data_lump.h"
#include "../../data_lump_rpl.h"
#include "../../pvar.h"
#include "../../parser/parse_from.h"
#include "../../parser/parse_uri.h"
#include "../../mem/mem.h"
#include "avpops_impl.h"
#include "avpops_db.h"

Include dependency graph for avpops_impl.c:

Go to the source code of this file.

Defines

#define AVP_PRINTBUF_SIZE   1024
#define AVPOPS_ATTR_LEN   64
#define avpops_str2int_str(a, b)
#define STR_BUF_SIZE   1024

Functions

static int append_0 (str *in, str *out)
static int avpops_get_aname (struct sip_msg *msg, struct fis_param *ap, int_str *avp_name, unsigned short *name_type)
static int dbrow2avp (struct db_row *row, struct db_param *dbp, int_str attr, int attr_type, int just_val_flags)
static strget_source_uri (struct sip_msg *msg, int source)
void init_store_avps (str **db_columns)
static void int_str2db_val (int_str is_val, str *val, int is_s)
int ops_check_avp (struct sip_msg *msg, struct fis_param *src, struct fis_param *val)
int ops_copy_avp (struct sip_msg *msg, struct fis_param *src, struct fis_param *dst)
int ops_dbdelete_avps (struct sip_msg *msg, struct fis_param *sp, struct db_param *dbp, int use_domain)
int ops_dbload_avps (struct sip_msg *msg, struct fis_param *sp, struct db_param *dbp, int use_domain)
int ops_dbquery_avps (struct sip_msg *msg, pv_elem_t *query, pvname_list_t *dest)
int ops_dbstore_avps (struct sip_msg *msg, struct fis_param *sp, struct db_param *dbp, int use_domain)
int ops_delete_avp (struct sip_msg *msg, struct fis_param *ap)
int ops_is_avp_set (struct sip_msg *msg, struct fis_param *ap)
int ops_op_avp (struct sip_msg *msg, struct fis_param **av, struct fis_param *val)
int ops_print_avp (void)
int ops_pushto_avp (struct sip_msg *msg, struct fis_param *dst, struct fis_param *src)
int ops_subst (struct sip_msg *msg, struct fis_param **src, struct subst_expr *se)

Variables

static char avpops_attr_buf [AVPOPS_ATTR_LEN]
static str empty = {"",0}
static char printbuf [AVP_PRINTBUF_SIZE]
static db_key_t store_keys [6]
static db_val_t store_vals [6]
static char str_buf [STR_BUF_SIZE]


Define Documentation

#define AVP_PRINTBUF_SIZE   1024

Definition at line 66 of file avpops_impl.c.

Referenced by ops_dbquery_avps().

#define AVPOPS_ATTR_LEN   64

Definition at line 280 of file avpops_impl.c.

Referenced by ops_dbdelete_avps(), ops_dbload_avps(), and ops_dbstore_avps().

#define avpops_str2int_str ( a,
 ) 

Definition at line 52 of file avpops_impl.c.

Referenced by ops_dbload_avps().

#define STR_BUF_SIZE   1024


Function Documentation

static int append_0 ( str in,
str out 
) [inline, static]

Definition at line 896 of file avpops_impl.c.

References _str::len, _str::s, str_buf, and STR_BUF_SIZE.

Referenced by ops_pushto_avp().

static int avpops_get_aname ( struct sip_msg msg,
struct fis_param ap,
int_str avp_name,
unsigned short *  name_type 
) [static]

static int dbrow2avp ( struct db_row row,
struct db_param dbp,
int_str  attr,
int  attr_type,
int  just_val_flags 
) [static]

static str* get_source_uri ( struct sip_msg msg,
int  source 
) [inline, static]

void init_store_avps ( str **  db_columns  ) 

Definition at line 69 of file avpops_impl.c.

References DB_INT, DB_STR, db_val_t::nul, and db_val_t::type.

Referenced by avpops_init().

static void int_str2db_val ( int_str  is_val,
str val,
int  is_s 
) [inline, static]

Definition at line 255 of file avpops_impl.c.

References int2str(), _str::len, int_str::n, _str::s, and int_str::s.

Referenced by ops_dbstore_avps().

int ops_check_avp ( struct sip_msg msg,
struct fis_param src,
struct fis_param val 
)

int ops_copy_avp ( struct sip_msg msg,
struct fis_param src,
struct fis_param dst 
)

int ops_dbdelete_avps ( struct sip_msg msg,
struct fis_param sp,
struct db_param dbp,
int  use_domain 
)

int ops_dbload_avps ( struct sip_msg msg,
struct fis_param sp,
struct db_param dbp,
int  use_domain 
)

int ops_dbquery_avps ( struct sip_msg msg,
pv_elem_t query,
pvname_list_t dest 
)

Definition at line 734 of file avpops_impl.c.

References AVP_PRINTBUF_SIZE, db_query_avp(), LM_DBG, LM_ERR, NULL, printbuf, and pv_printf().

Referenced by w_dbquery1_avps(), and w_dbquery2_avps().

int ops_dbstore_avps ( struct sip_msg msg,
struct fis_param sp,
struct db_param dbp,
int  use_domain 
)

int ops_delete_avp ( struct sip_msg msg,
struct fis_param ap 
)

int ops_is_avp_set ( struct sip_msg msg,
struct fis_param ap 
)

int ops_op_avp ( struct sip_msg msg,
struct fis_param **  av,
struct fis_param val 
)

int ops_print_avp ( void   ) 

int ops_pushto_avp ( struct sip_msg msg,
struct fis_param dst,
struct fis_param src 
)

int ops_subst ( struct sip_msg msg,
struct fis_param **  src,
struct subst_expr se 
)


Variable Documentation

char avpops_attr_buf[AVPOPS_ATTR_LEN] [static]

Definition at line 281 of file avpops_impl.c.

Referenced by ops_dbdelete_avps(), ops_dbload_avps(), and ops_dbstore_avps().

str empty = {"",0} [static]

Definition at line 63 of file avpops_impl.c.

Referenced by dlg_bridge_tm_callback(), dlg_transfer(), and mi_print_uris().

char printbuf[AVP_PRINTBUF_SIZE] [static]

Definition at line 67 of file avpops_impl.c.

Referenced by ops_dbquery_avps().

db_key_t store_keys[6] [static]

Definition at line 61 of file avpops_impl.c.

db_val_t store_vals[6] [static]

Definition at line 62 of file avpops_impl.c.

char str_buf[STR_BUF_SIZE] [static]


Generated on Thu May 17 12:00:35 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6