reg_mod.c File Reference

SIP registrar module - interface

More...

#include <stdio.h>
#include "../../sr_module.h"
#include "../../timer.h"
#include "../../dprint.h"
#include "../../error.h"
#include "../../socket_info.h"
#include "../../pvar.h"
#include "../usrloc/ul_mod.h"
#include "../sl/sl_api.h"
#include "../../mod_fix.h"
#include "save.h"
#include "lookup.h"
#include "regpv.h"
#include "reply.h"
#include "reg_mod.h"
#include "../../data_lump.h"
#include "../../ip_addr.h"
#include "../../ut.h"

Include dependency graph for reg_mod.c:

Go to the source code of this file.

Defines

#define RCV_NAME   "received"

Functions

static int add_sock_hdr (struct sip_msg *msg, char *str, char *foo)
 Functions.
static int child_init (int)
static int domain_fixup (void **param, int param_no)
 Fixup functions.
static int fetchc_fixup (void **param, int param_no)
 Convert char* parameter to udomain_t* pointer Convert char* parameter to pv_elem_t* pointer Convert char* parameter to str* pointer.
static void mod_destroy (void)
static MODULE_VERSION int mod_init (void)
 Module init & destroy function.
static int save_fixup (void **param, int param_no)
 Fixup for "save" function - both domain and flags.
static int unreg_fixup (void **param, int param_no)
 Convert char* parameter to udomain_t* pointer Convert char* parameter to pv_elem_t* pointer.

Variables

stat_varaccepted_registrations
int_str aor_avp_name
char * aor_avp_param = 0
unsigned short aor_avp_type = 0
int append_branches = 1
int case_sensitive = 0
static cmd_export_t cmds []
 Exported functions.
stat_vardefault_expire_stat
int default_expires = 3600
qvalue_t default_q = Q_UNSPECIFIED
struct module_exports exports
 Module exports structure.
int max_contacts = 0
stat_varmax_contacts_stat
int max_expires = 0
stat_varmax_expires_stat
int method_filtering = 0
int min_expires = 60
static pv_export_t mod_pvs []
 Exported PV.
stat_export_t mod_stats []
 We expose internal variables via the statistic framework below.
static param_export_t params []
 Exported parameters.
int path_enabled = 0
int path_mode = PATH_MODE_STRICT
int path_use_params = 0
int_str rcv_avp_name
char * rcv_avp_param = 0
unsigned short rcv_avp_type = 0
str rcv_param = str_init(RCV_NAME)
char * realm_pref = ""
str realm_prefix
int_str reg_callid_avp_name
char * reg_callid_avp_param = 0
unsigned short reg_callid_avp_type = 0
int reg_use_domain = 0
stat_varrejected_registrations
int retry_after = 0
struct sl_binds slb
int sock_flag = -1
str sock_hdr_name = {0,0}
int tcp_persistent_flag = -1


Detailed Description

SIP registrar module - interface

Definition in file reg_mod.c.


Define Documentation

#define RCV_NAME   "received"

Definition at line 136 of file reg_mod.c.


Function Documentation

static int add_sock_hdr ( struct sip_msg msg,
char *  str,
char *  foo 
) [static]

static int child_init ( int  rank  )  [static]

Definition at line 364 of file reg_mod.c.

References default_expires, max_contacts, max_expires, and update_stat.

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

Fixup functions.

Convert char* parameter to udomain_t* pointer.

Definition at line 380 of file reg_mod.c.

References E_UNSPEC, LM_ERR, usrloc_api::register_udomain, and ul.

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

Convert char* parameter to udomain_t* pointer Convert char* parameter to pv_elem_t* pointer Convert char* parameter to str* pointer.

Definition at line 444 of file reg_mod.c.

References domain_fixup(), fixup_spve_null(), and fixup_str_null().

static void mod_destroy ( void   )  [static]

Definition at line 457 of file reg_mod.c.

References free_contact_buf().

static int mod_init ( void   )  [static]

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

Fixup for "save" function - both domain and flags.

Definition at line 414 of file reg_mod.c.

References usrloc_api::db_mode, DB_ONLY, domain_fixup(), E_CFG, _str::len, LM_ERR, pkg_free, REG_SAVE_ALL_FL, REG_SAVE_MEM_FL, _str::s, s, strno2int(), and ul.

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

Convert char* parameter to udomain_t* pointer Convert char* parameter to pv_elem_t* pointer.

Definition at line 399 of file reg_mod.c.

References domain_fixup(), and fixup_spve_null().


Variable Documentation

Definition at line 139 of file reg_mod.c.

Referenced by save().

Definition at line 118 of file reg_mod.c.

Referenced by extract_aor().

char* aor_avp_param = 0

if instead of extacting the AOR from the request, it should be fetched via this AVP ID

Definition at line 115 of file reg_mod.c.

Referenced by mod_init().

unsigned short aor_avp_type = 0

Definition at line 117 of file reg_mod.c.

Referenced by extract_aor(), and mod_init().

int append_branches = 1

If set to 1, lookup will put all contacts found in msg structure

Definition at line 96 of file reg_mod.c.

Referenced by lookup().

int case_sensitive = 0

If set to 1, username in aor will be case sensitive

Definition at line 97 of file reg_mod.c.

Referenced by extract_aor().

cmd_export_t cmds[] [static]

Exported functions.

Definition at line 161 of file reg_mod.c.

Definition at line 143 of file reg_mod.c.

int default_expires = 3600

Default expires value in seconds

Definition at line 94 of file reg_mod.c.

qvalue_t default_q = Q_UNSPECIFIED

Default q value multiplied by 1000

Definition at line 95 of file reg_mod.c.

Referenced by calc_contact_q(), and mod_init().

Module exports structure.

Definition at line 226 of file reg_mod.c.

int max_contacts = 0

Maximum number of contacts per AOR (0=no checking)

Definition at line 103 of file reg_mod.c.

Referenced by child_init(), insert_contacts(), test_max_contacts(), and update_contacts().

Definition at line 142 of file reg_mod.c.

int max_expires = 0

Maximum expires the phones are allowed to use in seconds, use 0 to switch expires checking off

Definition at line 101 of file reg_mod.c.

Definition at line 141 of file reg_mod.c.

if the looked up contacts should be filtered based on supported methods

Definition at line 105 of file reg_mod.c.

int min_expires = 60

Minimum expires the phones are allowed to use in seconds use 0 to switch expires checking off

Definition at line 99 of file reg_mod.c.

pv_export_t mod_pvs[] [static]

Initial value:

 {
   { {"ulc", sizeof("ulc")-1}, PVT_OTHER, pv_get_ulc, pv_set_ulc,
      pv_parse_ulc_name, pv_parse_index, 0, 0 },
   { {0, 0}, 0, 0, 0, 0, 0, 0, 0 }
}
Exported PV.

Definition at line 151 of file reg_mod.c.

We expose internal variables via the statistic framework below.

Definition at line 213 of file reg_mod.c.

param_export_t params[] [static]

Exported parameters.

Definition at line 187 of file reg_mod.c.

int path_enabled = 0

if the Path HF should be handled

Definition at line 106 of file reg_mod.c.

Referenced by pack_ci(), and send_reply().

int path_mode = PATH_MODE_STRICT

if the Path HF should be inserted in the reply.

  • STRICT (2): always insert, error if no support indicated in request
  • LAZY (1): insert only if support indicated in request
  • OFF (0): never insert

Definition at line 107 of file reg_mod.c.

Referenced by send_reply().

int path_use_params = 0

if the received- and nat-parameters of last Path uri should be used to determine if UAC is nat'ed

Definition at line 112 of file reg_mod.c.

Referenced by build_path_vector().

Definition at line 127 of file reg_mod.c.

char* rcv_avp_param = 0

Definition at line 125 of file reg_mod.c.

unsigned short rcv_avp_type = 0

Definition at line 126 of file reg_mod.c.

str rcv_param = str_init(RCV_NAME)

Definition at line 137 of file reg_mod.c.

Referenced by build_contact(), and calc_buf_len().

char* realm_pref = ""

Realm prefix to be removed

Definition at line 130 of file reg_mod.c.

Referenced by mod_init().

strip off auto-generated realm

Prefix to strip from realm

Definition at line 131 of file reg_mod.c.

Definition at line 123 of file reg_mod.c.

Referenced by registered().

Definition at line 121 of file reg_mod.c.

Referenced by mod_init().

unsigned short reg_callid_avp_type = 0

Definition at line 122 of file reg_mod.c.

Referenced by mod_init(), and registered().

int reg_use_domain = 0

Definition at line 129 of file reg_mod.c.

Referenced by extract_aor(), and mod_init().

Definition at line 140 of file reg_mod.c.

Referenced by save().

int retry_after = 0

The value of Retry-After HF in 5xx replies

Definition at line 104 of file reg_mod.c.

Referenced by add_retry_after(), and send_reply().

struct sl_binds slb

SL binds

Definition at line 146 of file reg_mod.c.

int sock_flag = -1

Definition at line 133 of file reg_mod.c.

Referenced by mod_init(), and pack_ci().

str sock_hdr_name = {0,0}

Definition at line 134 of file reg_mod.c.

Referenced by get_sock_hdr().

if the TCP connection should be kept open

Definition at line 98 of file reg_mod.c.

Referenced by insert_contacts(), mod_init(), and update_contacts().


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