sl.c File Reference

SL :: module definitions

More...

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "../../sr_module.h"
#include "../../dprint.h"
#include "../../error.h"
#include "../../ut.h"
#include "../../script_cb.h"
#include "../../mem/mem.h"
#include "../../pvar.h"
#include "../tm/tm_load.h"
#include "sl_funcs.h"
#include "sl_api.h"
#include "sl_cb.h"

Include dependency graph for sl.c:

Go to the source code of this file.

Functions

static int fixup_sl_send_reply (void **param, int param_no)
 Fixup function for sl_send_reply.
int get_reply_totag (struct sip_msg *msg, str *totag)
int load_sl (struct sl_binds *slb)
 Helper function for loading the SL API.
static void mod_destroy (void)
static int mod_init (void)
int send_reply (struct sip_msg *msg, int code, str *text)
static int w_send_reply (struct sip_msg *msg, char *str1, char *str2)
static int w_sl_reply_error (struct sip_msg *msg, char *str1, char *str2)
 Small wrapper around sl_send_reply.
static MODULE_VERSION int w_sl_send_reply (struct sip_msg *msg, char *str1, char *str2)
 Wrapper around sl_send_reply.

Variables

static cmd_export_t cmds []
struct module_exports exports
static param_export_t mod_params []
stat_export_t mod_stats []
stat_varrcv_acks
stat_varsent_err_rpls
stat_varsent_rpls
int sl_bind_tm = 1
int sl_enable_stats = 1
static struct tm_binds tmb
stat_vartx_1xx_rpls
stat_vartx_2xx_rpls
stat_vartx_3xx_rpls
stat_vartx_4xx_rpls
stat_vartx_5xx_rpls
stat_vartx_6xx_rpls


Detailed Description

SL :: module definitions

Definition in file sl.c.


Function Documentation

static int fixup_sl_send_reply ( void **  param,
int  param_no 
) [static]

Fixup function for sl_send_reply.

Definition at line 194 of file sl.c.

References E_UNSPEC, _pv_spec::getf, _pv_name::isname, _str::len, LM_ERR, NULL, pv_parse_format(), _pv_param::pvn, _pv_spec::pvp, _str::s, s, _pv_elem::spec, str2int(), and _pv_name::u.

int get_reply_totag ( struct sip_msg msg,
str totag 
)

Definition at line 328 of file sl.c.

References LM_DBG, LM_ERR, NULL, sl_bind_tm, sl_get_reply_totag(), tm_binds::t_get_reply_totag, tm_binds::t_gett, T_UNDEFINED, and tmb.

Referenced by load_sl().

int load_sl ( struct sl_binds slb  ) 

Helper function for loading the SL API.

Parameters:
slb sl_bind structure
Returns:
-1 on parameter errors, 1 otherwise

Definition at line 357 of file sl.c.

References get_reply_totag(), sl_binds::get_reply_totag, NULL, sl_binds::reply, sl_binds::reply_dlg, send_reply(), sl_binds::send_reply, sl_get_reply_totag(), sl_binds::sl_get_reply_totag, sl_send_reply(), and sl_send_reply_dlg().

Referenced by load_sl_api().

static void mod_destroy ( void   )  [static]

Definition at line 184 of file sl.c.

References destroy_slcb_lists(), and sl_shutdown().

static int mod_init ( void   )  [static]

int send_reply ( struct sip_msg msg,
int  code,
str text 
)

Definition at line 280 of file sl.c.

References LM_DBG, LM_ERR, NULL, sl_bind_tm, sl_send_reply(), tm_binds::t_gett, tm_binds::t_reply, T_UNDEFINED, and tmb.

static int w_send_reply ( struct sip_msg msg,
char *  str1,
char *  str2 
) [static]

Definition at line 302 of file sl.c.

References _str::len, NULL, pv_printf_s(), send_reply(), and str2int().

static int w_sl_reply_error ( struct sip_msg msg,
char *  str1,
char *  str2 
) [static]

Small wrapper around sl_send_reply.

Definition at line 243 of file sl.c.

References sl_reply_error().

static int w_sl_send_reply ( struct sip_msg msg,
char *  str1,
char *  str2 
) [static]

Wrapper around sl_send_reply.

Wrapper around sl_send_reply, evaluate pseudo-variables.

Definition at line 254 of file sl.c.

References _str::len, NULL, pv_printf_s(), sl_send_reply(), and str2int().


Variable Documentation

cmd_export_t cmds[] [static]

Definition at line 93 of file sl.c.

Definition at line 133 of file sl.c.

Initial value:

{
   { "enable_stats",  INT_PARAM, &sl_enable_stats },
   { "bind_tm",       INT_PARAM, &sl_bind_tm },
   { 0,0,0 }
}

Definition at line 112 of file sl.c.

Definition at line 119 of file sl.c.

Definition at line 89 of file sl.c.

Referenced by sl_filter_ACK().

Definition at line 88 of file sl.c.

Referenced by sl_reply_error().

Definition at line 87 of file sl.c.

Referenced by update_sl_reply_stat().

int sl_bind_tm = 1

Definition at line 78 of file sl.c.

Referenced by get_reply_totag(), mod_init(), and send_reply().

int sl_enable_stats = 1

Definition at line 77 of file sl.c.

Referenced by mod_init(), sl_filter_ACK(), sl_reply_error(), and update_sl_reply_stat().

struct tm_binds tmb [static]

Definition at line 91 of file sl.c.

Definition at line 81 of file sl.c.

Referenced by update_sl_reply_stat().

Definition at line 82 of file sl.c.

Referenced by update_sl_reply_stat().

Definition at line 83 of file sl.c.

Referenced by update_sl_reply_stat().

Definition at line 84 of file sl.c.

Referenced by update_sl_reply_stat().

Definition at line 85 of file sl.c.

Referenced by update_sl_reply_stat().

Definition at line 86 of file sl.c.

Referenced by update_sl_reply_stat().


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