mod_fix.h File Reference

Generic fixup functions for module function parameter. More...

#include "pvar.h"

Include dependency graph for mod_fix.h:

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

Go to the source code of this file.

Data Structures

struct  _gparam

Defines

#define GPARAM_TYPE_INT   0
#define GPARAM_TYPE_PVE   3
#define GPARAM_TYPE_PVS   2
#define GPARAM_TYPE_STR   1

Typedefs

typedef struct _gparamgparam_p
typedef struct _gparam gparam_t

Functions

int fixup_free_igp_pvar_pvar (void **param, int param_no)
 fixup free for functions that get three parameters
  • first parameter was converted to gparam_t (int or PV)
  • second parameter was converted to PV spec
  • third parameter was converted to PV spec

int fixup_free_pvar_null (void **param, int param_no)
 fixup free for functions that get one parameter
  • first parameter was converted to PV spec

int fixup_free_pvar_pvar (void **param, int param_no)
 fixup free for functions that get two parameters
  • both parameters were converted to PV spec

int fixup_free_pvar_str (void **param, int param_no)
 fixup free for functions that get two parameters
  • first parameter was converted to PV spec
  • second parameter was converted to str*

int fixup_free_pvar_str_str (void **param, int param_no)
 fixup free for functions that get three parameters
  • first parameter was converted to PV spec
  • second parameter was converted to str*
  • third parameter was converted to str*

int fixup_free_regexp_none (void **param, int param_no)
int fixup_free_regexp_null (void **param, int param_no)
int fixup_free_str_null (void **param, int param_no)
 fixup free for functions that get one parameter
  • first parameter was converted to str*

int fixup_free_str_str (void **param, int param_no)
 fixup free for functions that get two parameters
  • first parameter was converted to str*
  • second parameter was converted to str*

int fixup_get_ivalue (struct sip_msg *msg, gparam_p gp, int *val)
 
  • helper function Return integer value from a gparam_t

int fixup_get_svalue (struct sip_msg *msg, gparam_p gp, str *val)
 
  • helper function Return string value from a gparam_t

int fixup_igp_igp (void **param, int param_no)
 fixup for functions that get two parameters
  • first parameter is converted to gparam_t (int or PV)
  • second parameter is converted to gparam_t (int or PV)

int fixup_igp_null (void **param, int param_no)
 fixup for functions that get one parameter
  • first parameter is converted to gparam_t (int or PV)

int fixup_igp_pvar_pvar (void **param, int param_no)
 fixup for functions that get three parameters
  • first parameter is converted to gparam_t (int or PV)
  • second parameter is converted to PV spec
  • third parameter is converted to PV spec

int fixup_pvar (void **param)
 
  • helper function: Convert char* parameter to PV spec structure

int fixup_pvar_null (void **param, int param_no)
 fixup for functions that get one parameter
  • first parameter is converted to PV spec

int fixup_pvar_pvar (void **param, int param_no)
 fixup for functions that get two parameters
  • both parameters are converted to PV spec

int fixup_pvar_str (void **param, int param_no)
 fixup for functions that get two parameters
  • first parameter is converted to PV spec
  • second parameter is converted to str*

int fixup_pvar_str_str (void **param, int param_no)
 fixup for functions that get three parameters
  • first parameter is converted to PV spec
  • second parameter is converted to str*
  • third parameter is converted to str*

int fixup_regexp_none (void **param, int param_no)
 fixup for functions that get two parameters
  • first parameter is converted to regular expression structure
  • second parameter is not converted

int fixup_regexp_null (void **param, int param_no)
 fixup for functions that get one parameter
  • first parameter is converted to regular expression structure

int fixup_regexpNL_none (void **param, int param_no)
 fixup for functions that get two parameters
  • first parameter is converted to regular expression structure where "match-any-character" operators also match a newline
  • second parameter is not converted

int fixup_regexpNL_null (void **param, int param_no)
 fixup for functions that get one parameter
  • first parameter is converted to regular expression structure where "match-any-character" operators also match a newline

int fixup_spve_null (void **param, int param_no)
 fixup for functions that get one parameter
  • first parameter is converted to gparam_t (str or pv_elem_t)

int fixup_spve_spve (void **param, int param_no)
 fixup for functions that get two parameters
  • first parameter is converted to gparam_t (str or pv_elem_t)
  • second parameter is converted to gparam_t (str or pv_elem_t)

int fixup_spve_str (void **param, int param_no)
 fixup for functions that get two parameters
  • first parameter is converted to gparam_t (str or pv_elem_t)
  • second parameter is converted to str

int fixup_spve_uint (void **param, int param_no)
 fixup for functions that get two parameters
  • first parameter is converted to gparam_t (str or pv_elem_t)
  • second parameter is converted to uint

int fixup_str_null (void **param, int param_no)
 fixup for functions that get one parameter
  • first parameter is converted to str*

int fixup_str_str (void **param, int param_no)
 fixup for functions that get two parameters
  • first parameter is converted to str*
  • second parameter is converted to str*

int fixup_uint_null (void **param, int param_no)
 fixup for functions that get one parameter
  • first parameter is converted to unsigned int

int fixup_uint_uint (void **param, int param_no)
 fixup for functions that get two parameters
  • first parameter is converted to unsigned int
  • second parameter is converted to unsigned int


Detailed Description

Generic fixup functions for module function parameter.

Definition in file mod_fix.h.


Define Documentation

#define GPARAM_TYPE_INT   0

#define GPARAM_TYPE_PVE   3

Definition at line 36 of file mod_fix.h.

Referenced by cr_gp2id(), fixup_get_svalue(), and fixup_spve().

#define GPARAM_TYPE_PVS   2

Definition at line 35 of file mod_fix.h.

Referenced by fixup_get_svalue(), and fixup_igp().

#define GPARAM_TYPE_STR   1


Typedef Documentation

typedef struct _gparam * gparam_p

typedef struct _gparam gparam_t

generic parameter that holds a string, an int or a pseudo-variable


Function Documentation

int fixup_free_igp_pvar_pvar ( void **  param,
int  param_no 
)

fixup free for functions that get three parameters

  • first parameter was converted to gparam_t (int or PV)
  • second parameter was converted to PV spec
  • third parameter was converted to PV spec

Definition at line 713 of file mod_fix.c.

References E_UNSPEC, fixup_free_pvar(), and LM_ERR.

int fixup_free_pvar_null ( void **  param,
int  param_no 
)

fixup free for functions that get one parameter

  • first parameter was converted to PV spec

Definition at line 488 of file mod_fix.c.

References E_UNSPEC, fixup_free_pvar(), and LM_ERR.

Referenced by fixup_free_http_query().

int fixup_free_pvar_pvar ( void **  param,
int  param_no 
)

fixup free for functions that get two parameters

  • both parameters were converted to PV spec

Definition at line 520 of file mod_fix.c.

References E_UNSPEC, fixup_free_pvar(), and LM_ERR.

int fixup_free_pvar_str ( void **  param,
int  param_no 
)

fixup free for functions that get two parameters

  • first parameter was converted to PV spec
  • second parameter was converted to str*

Definition at line 558 of file mod_fix.c.

References E_UNSPEC, fixup_free_pvar(), fixup_free_str(), and LM_ERR.

int fixup_free_pvar_str_str ( void **  param,
int  param_no 
)

fixup free for functions that get three parameters

  • first parameter was converted to PV spec
  • second parameter was converted to str*
  • third parameter was converted to str*

Definition at line 598 of file mod_fix.c.

References E_UNSPEC, fixup_free_pvar(), fixup_free_str(), and LM_ERR.

int fixup_free_regexp_none ( void **  param,
int  param_no 
)

fixup free for functions that get two parameters

  • first parameter was converted to regular expression
  • second parameter was notconverted

Definition at line 416 of file mod_fix.c.

References E_UNSPEC, fixup_free_regexp(), and LM_ERR.

Referenced by search_api(), and search_append_api().

int fixup_free_regexp_null ( void **  param,
int  param_no 
)

fixup free for functions that get one parameter

  • first parameter was converted to regular expression

Definition at line 366 of file mod_fix.c.

References E_UNSPEC, fixup_free_regexp(), and LM_ERR.

int fixup_free_str_null ( void **  param,
int  param_no 
)

fixup free for functions that get one parameter

  • first parameter was converted to str*

Definition at line 129 of file mod_fix.c.

References E_UNSPEC, fixup_free_str(), and LM_ERR.

int fixup_free_str_str ( void **  param,
int  param_no 
)

fixup free for functions that get two parameters

  • first parameter was converted to str*
  • second parameter was converted to str*

Definition at line 144 of file mod_fix.c.

References E_UNSPEC, fixup_free_str(), and LM_ERR.

int fixup_get_ivalue ( struct sip_msg msg,
gparam_p  gp,
int *  val 
)

int fixup_get_svalue ( struct sip_msg msg,
gparam_p  gp,
str val 
)

int fixup_igp_igp ( void **  param,
int  param_no 
)

fixup for functions that get two parameters

  • first parameter is converted to gparam_t (int or PV)
  • second parameter is converted to gparam_t (int or PV)

Definition at line 679 of file mod_fix.c.

References E_UNSPEC, fixup_igp(), and LM_ERR.

int fixup_igp_null ( void **  param,
int  param_no 
)

fixup for functions that get one parameter

  • first parameter is converted to gparam_t (int or PV)

Definition at line 664 of file mod_fix.c.

References E_UNSPEC, fixup_igp(), and LM_ERR.

int fixup_igp_pvar_pvar ( void **  param,
int  param_no 
)

fixup for functions that get three parameters

  • first parameter is converted to gparam_t (int or PV)
  • second parameter is converted to PV spec
  • third parameter is converted to PV spec

Definition at line 695 of file mod_fix.c.

References E_UNSPEC, fixup_igp(), fixup_pvar(), and LM_ERR.

int fixup_pvar ( void **  param  ) 

int fixup_pvar_null ( void **  param,
int  param_no 
)

fixup for functions that get one parameter

  • first parameter is converted to PV spec

Definition at line 474 of file mod_fix.c.

References E_UNSPEC, fixup_pvar(), and LM_ERR.

int fixup_pvar_pvar ( void **  param,
int  param_no 
)

fixup for functions that get two parameters

  • both parameters are converted to PV spec

Definition at line 502 of file mod_fix.c.

References E_UNSPEC, fixup_pvar(), and LM_ERR.

int fixup_pvar_str ( void **  param,
int  param_no 
)

fixup for functions that get two parameters

  • first parameter is converted to PV spec
  • second parameter is converted to str*

Definition at line 539 of file mod_fix.c.

References E_UNSPEC, fixup_pvar(), fixup_str(), and LM_ERR.

int fixup_pvar_str_str ( void **  param,
int  param_no 
)

fixup for functions that get three parameters

  • first parameter is converted to PV spec
  • second parameter is converted to str*
  • third parameter is converted to str*

Definition at line 578 of file mod_fix.c.

References E_UNSPEC, fixup_pvar(), fixup_str(), and LM_ERR.

int fixup_regexp_none ( void **  param,
int  param_no 
)

fixup for functions that get two parameters

  • first parameter is converted to regular expression structure
  • second parameter is not converted

Definition at line 381 of file mod_fix.c.

References E_UNSPEC, fixup_regexp(), and LM_ERR.

Referenced by search_api(), and search_append_api().

int fixup_regexp_null ( void **  param,
int  param_no 
)

fixup for functions that get one parameter

  • first parameter is converted to regular expression structure

Definition at line 337 of file mod_fix.c.

References E_UNSPEC, fixup_regexp(), and LM_ERR.

int fixup_regexpNL_none ( void **  param,
int  param_no 
)

fixup for functions that get two parameters

  • first parameter is converted to regular expression structure where "match-any-character" operators also match a newline
  • second parameter is not converted

Definition at line 399 of file mod_fix.c.

References E_UNSPEC, fixup_regexp(), and LM_ERR.

int fixup_regexpNL_null ( void **  param,
int  param_no 
)

fixup for functions that get one parameter

  • first parameter is converted to regular expression structure where "match-any-character" operators also match a newline

Definition at line 352 of file mod_fix.c.

References E_UNSPEC, fixup_regexp(), and LM_ERR.

int fixup_spve_null ( void **  param,
int  param_no 
)

fixup for functions that get one parameter

  • first parameter is converted to gparam_t (str or pv_elem_t)

Definition at line 788 of file mod_fix.c.

References E_UNSPEC, fixup_spve(), and LM_ERR.

Referenced by add_header_fixup(), auth_fixup(), avp_name_fixup(), carrier_fixup(), cr_load_next_domain_fixup(), cr_load_user_carrier_fixup(), cr_route_fixup(), domain_fixup(), exec_avp_fixup(), fetchc_fixup(), fixup_dlg_bridge(), fixup_dlg_refer(), fixup_http_query(), mod_init(), and unreg_fixup().

int fixup_spve_spve ( void **  param,
int  param_no 
)

fixup for functions that get two parameters

  • first parameter is converted to gparam_t (str or pv_elem_t)
  • second parameter is converted to gparam_t (str or pv_elem_t)

Definition at line 803 of file mod_fix.c.

References E_UNSPEC, fixup_spve(), and LM_ERR.

int fixup_spve_str ( void **  param,
int  param_no 
)

fixup for functions that get two parameters

  • first parameter is converted to gparam_t (str or pv_elem_t)
  • second parameter is converted to str

Definition at line 836 of file mod_fix.c.

References E_UNSPEC, fixup_spve(), fixup_str(), and LM_ERR.

int fixup_spve_uint ( void **  param,
int  param_no 
)

fixup for functions that get two parameters

  • first parameter is converted to gparam_t (str or pv_elem_t)
  • second parameter is converted to uint

Definition at line 818 of file mod_fix.c.

References E_UNSPEC, fixup_spve(), fixup_uint(), and LM_ERR.

int fixup_str_null ( void **  param,
int  param_no 
)

fixup for functions that get one parameter

  • first parameter is converted to str*

Definition at line 100 of file mod_fix.c.

References E_UNSPEC, fixup_str(), and LM_ERR.

Referenced by fetchc_fixup().

int fixup_str_str ( void **  param,
int  param_no 
)

fixup for functions that get two parameters

  • first parameter is converted to str*
  • second parameter is converted to str*

Definition at line 115 of file mod_fix.c.

References E_UNSPEC, fixup_str(), and LM_ERR.

int fixup_uint_null ( void **  param,
int  param_no 
)

fixup for functions that get one parameter

  • first parameter is converted to unsigned int

Definition at line 181 of file mod_fix.c.

References E_UNSPEC, fixup_uint(), and LM_ERR.

Referenced by fixup_fix_sdp().

int fixup_uint_uint ( void **  param,
int  param_no 
)

fixup for functions that get two parameters

  • first parameter is converted to unsigned int
  • second parameter is converted to unsigned int

Definition at line 196 of file mod_fix.c.

References E_UNSPEC, fixup_uint(), and LM_ERR.


Generated on Wed May 23 20:00:40 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6