#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"

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_var * | accepted_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_var * | default_expire_stat |
| int | default_expires = 3600 |
| qvalue_t | default_q = Q_UNSPECIFIED |
| struct module_exports | exports |
| Module exports structure. | |
| int | max_contacts = 0 |
| stat_var * | max_contacts_stat |
| int | max_expires = 0 |
| stat_var * | max_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_var * | rejected_registrations |
| int | retry_after = 0 |
| struct sl_binds | slb |
| int | sock_flag = -1 |
| str | sock_hdr_name = {0,0} |
| int | tcp_persistent_flag = -1 |
Definition in file reg_mod.c.
| static int add_sock_hdr | ( | struct sip_msg * | msg, | |
| char * | str, | |||
| char * | foo | |||
| ) | [static] |
Functions.
Definition at line 467 of file reg_mod.c.
References anchor_lump(), receive_info::bind_address, sip_msg::buf, CRLF, CRLF_LEN, HDR_EOH_F, insert_new_lump_before(), _str::len, LM_CRIT, LM_ERR, parse_headers(), pkg_free, pkg_malloc, sip_msg::rcv, _str::s, socket_info::sock_str, and sip_msg::unparsed.
| 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] |
| 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] |
| static int mod_init | ( | void | ) | [static] |
Module init & destroy function.
Initialize parent.
Definition at line 245 of file reg_mod.c.
References aor_avp_param, aor_avp_type, bind_usrloc(), default_q, find_export(), _str::len, LM_DBG, LM_ERR, LM_WARN, load_sl_api(), MAX_Q, MIN_Q, int_str::n, pkg_free, pv_get_avp_name(), pv_parse_spec(), _pv_spec::pvp, PVT_AVP, Q_UNSPECIFIED, rcv_avp_param, rcv_avp_type, realm_pref, reg_callid_avp_param, reg_callid_avp_type, reg_use_domain, _str::s, s, slb, sock_flag, tcp_persistent_flag, _pv_spec::type, ul, and usrloc_api::use_domain.
| 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().
| 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 |
| int append_branches = 1 |
| 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] |
| int default_expires = 3600 |
Default q value multiplied by 1000
Definition at line 95 of file reg_mod.c.
Referenced by calc_contact_q(), and mod_init().
| struct module_exports exports |
| 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().
| int max_expires = 0 |
| int method_filtering = 0 |
| int min_expires = 60 |
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 }
}
param_export_t params[] [static] |
| 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.
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().
| char* rcv_avp_param = 0 |
| unsigned short rcv_avp_type = 0 |
| char* realm_pref = "" |
| char* reg_callid_avp_param = 0 |
| unsigned short reg_callid_avp_type = 0 |
| int reg_use_domain = 0 |
| 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().
| int sock_flag = -1 |
| str sock_hdr_name = {0,0} |
| int tcp_persistent_flag = -1 |
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().
1.5.6