#include <stdio.h>#include <stdlib.h>#include <string.h>#include <arpa/inet.h>#include <pcre.h>#include "../../locking.h"#include "../../sr_module.h"#include "../../dprint.h"#include "../../ut.h"#include "../../error.h"#include "../../mem/mem.h"#include "../../mem/shm_mem.h"#include "../../db/db.h"#include "../../usr_avp.h"#include "../../parser/parse_uri.h"#include "../../parser/parse_from.h"#include "../../parser/msg_parser.h"#include "../../action.h"#include "../../qvalue.h"#include "../../dset.h"#include "../../ip_addr.h"#include "../../resolve.h"#include "../../mi/mi.h"#include "../../mod_fix.h"#include "../../socket_info.h"#include "../tm/tm_load.h"#include "../../pvar.h"#include "hash.h"#include "mi.h"

Go to the source code of this file.
Data Structures | |
| struct | gw_grp |
| struct | gw_info |
| struct | matched_gw_info |
Defines | |
| #define | DEF_FETCH_ROWS 2000 |
| #define | DEF_LCR_HASH_SIZE 128 |
| #define | DEF_PING_TIMER 180 |
| #define | FLAGS_COL "flags" |
| #define | FROM_URI_COL "from_uri" |
| #define | GRP_ID_COL "grp_id" |
| #define | GW_NAME_COL "gw_name" |
| #define | GW_TABLE "gw" |
| #define | GW_TABLE_VERSION 9 |
| #define | HOSTNAME_COL "hostname" |
| #define | IP_ADDR_COL "ip_addr" |
| #define | LCR_TABLE "lcr" |
| #define | LCR_TABLE_VERSION 2 |
| #define | MAX_CODES 10 |
| #define | MAX_HOST_LEN 64 |
| #define | MAX_NO_OF_GWS 128 |
| #define | MAX_TAG_LEN 16 |
| #define | MAX_USER_LEN 64 |
| #define | PING_COL "ping" |
| #define | PORT_COL "port" |
| #define | PREFIX_COL "prefix" |
| #define | PRIORITY_COL "priority" |
| #define | Q_FLAG (1<<2) |
| #define | STRIP_COL "strip" |
| #define | TAG_COL "tag" |
| #define | TRANSPORT_COL "transport" |
| #define | URI_SCHEME_COL "uri_scheme" |
| #define | WEIGHT_COL "weight" |
Typedefs | |
| typedef enum sip_protos | uri_transport |
Functions | |
| static int | add_code_to_array (str *codes, int local_codes[]) |
| void | add_gws_into_avps (struct matched_gw_info *matched_gws, unsigned int gw_cnt, str *ruri_user) |
| static void | check_options_callback (struct cell *t, int type, struct tmcb_params *ps) |
| Callback-Function for the OPTIONS-Request This Function is called, as soon as the Transaction is finished (e. g. a Response came in, the timeout was hit, ...) Some part of this code was imported from dispatcher module. | |
| int | check_our_gws (void) |
| static int | comp_gw_grps (const void *_g1, const void *_g2) |
| static int | comp_gws (const void *_g1, const void *_g2) |
| static int | comp_matched (const void *m1, const void *m2) |
| int | decode_avp_value (char *value, str *scheme, unsigned int *strip, str *tag, str *addr, str *hostname, str *port, str *transport, unsigned int *flags) |
| static void | destroy (void) |
| static int | do_from_gw (struct sip_msg *_m, pv_spec_t *addr_sp, int grp_id) |
| static int | do_load_gws (struct sip_msg *_m, str *_from_uri) |
| static int | do_to_gw (struct sip_msg *_m, pv_spec_t *addr_sp, int grp_id) |
| int | encode_avp_value (char *value, uri_type scheme, unsigned int strip, char *tag, unsigned int tag_len, unsigned int ip_addr, char *hostname, unsigned int hostname_len, unsigned int port, uri_transport transport, unsigned int flags) |
| static int | find_first_gw (struct gw_grp *gw_grps, unsigned int grp_cnt, unsigned int grp_id) |
| static int | fixstringloadgws (void **param, int param_count) |
| static void | free_shared_memory (void) |
| static int | from_gw_0 (struct sip_msg *_m, char *_s1, char *_s2) |
| static int | from_gw_1 (struct sip_msg *_m, char *_s1, char *_s2) |
| static int | from_gw_grp (struct sip_msg *_m, char *_s1, char *_s2) |
| static int | generate_uris (char *r_uri, str *r_uri_user, unsigned int *r_uri_len, char *dst_uri, unsigned int *dst_uri_len, unsigned int *flags) |
| int | gw_set_state (int index, struct sip_uri *uri, int ping) |
| static int | gw_unique (const struct gw_info *gws, const unsigned int count, const unsigned int ip_addr, const unsigned int grp_id) |
| static int | insert_gw (struct gw_info *gws, unsigned int i, unsigned int ip_addr, char *hostname, unsigned int hostname_len, unsigned int grp_id, char *ip_string, unsigned int port, unsigned int scheme, unsigned int transport, unsigned int flags, unsigned int strip, char *tag, unsigned int tag_len, unsigned short weight, unsigned short ping) |
| static int | lcr_db_bind (const str *db_url) |
| static void | lcr_db_close (void) |
| static int | lcr_db_init (const str *db_url) |
| static void | link_gw_grps (struct gw_info *gws, struct gw_grp *gw_grps, unsigned int *grp_cnt) |
| static int | load_gws_0 (struct sip_msg *_m, char *_s1, char *_s2) |
| static int | load_gws_1 (struct sip_msg *_m, char *_s1, char *_s2) |
| static int | load_gws_from_grp (struct sip_msg *_m, char *_s1, char *_s2) |
| static int | mi_child_init (void) |
| int | mi_print_gws (struct mi_node *rpl) |
| int | mi_print_lcrs (struct mi_node *rpl) |
| static int | mod_init (void) |
| static int | next_gw (struct sip_msg *_m, char *_s1, char *_s2) |
| static int | prefix_len_insert (struct lcr_info **table, unsigned short prefix_len) |
| static pcre * | reg_ex_comp (const char *pattern) |
| int | reload_gws_and_lcrs (void) |
| int | send_sip_options_request (str *to, int index) |
| static void | timer (unsigned int ticks, void *param) |
| static int | to_gw_0 (struct sip_msg *_m, char *_s1, char *_s2) |
| static int | to_gw_1 (struct sip_msg *_m, char *_s1, char *_s2) |
| static int | to_gw_grp (struct sip_msg *_m, char *_s1, char *_s2) |
Variables | |
| static cmd_export_t | cmds [] |
| static db_con_t * | db_handle = 0 |
| static str | db_url = str_init(DEFAULT_RODB_URL) |
| struct module_exports | exports |
| static int | fetch_rows_param = DEF_FETCH_ROWS |
| static int_str | flags_avp |
| static char * | flags_avp_param = NULL |
| static int | flags_avp_type |
| static str | flags_col = str_init(FLAGS_COL) |
| static str | from_uri_col = str_init(FROM_URI_COL) |
| static str | grp_id_col = str_init(GRP_ID_COL) |
| static str | gw_name_col = str_init(GW_NAME_COL) |
| static str | gw_table = str_init(GW_TABLE) |
| static int_str | gw_uri_avp |
| static char * | gw_uri_avp_param = NULL |
| static int | gw_uri_avp_type |
| struct gw_info ** | gws |
| struct gw_info * | gws_1 |
| struct gw_info * | gws_2 |
| static str | hostname_col = str_init(HOSTNAME_COL) |
| static str | ip_addr_col = str_init(IP_ADDR_COL) |
| static db_func_t | lcr_dbf |
| unsigned int | lcr_hash_size_param = DEF_LCR_HASH_SIZE |
| static str | lcr_table = str_init(LCR_TABLE) |
| struct lcr_info *** | lcrs |
| struct lcr_info ** | lcrs_1 |
| struct lcr_info ** | lcrs_2 |
| static mi_export_t | mi_cmds [] |
| int | negative_codes [MAX_CODES] |
| static str | negative_codes_str = {"408", 3} |
| static param_export_t | params [] |
| static str | ping_col = str_init(PING_COL) |
| static str | ping_from = {"sip:127.0.0.1", 20} |
| int | ping_interval = 0 |
| static str | ping_method = {"OPTIONS", 7} |
| static str | port_col = str_init(PORT_COL) |
| int | positive_codes [MAX_CODES] |
| static str | positive_codes_str = {"200;501;403;404", 15} |
| static str | prefix_col = str_init(PREFIX_COL) |
| static str | priority_col = str_init(PRIORITY_COL) |
| gen_lock_t * | reload_lock |
| static int_str | rpid_avp |
| static char * | rpid_avp_param = NULL |
| static int | rpid_avp_type |
| static int_str | ruri_user_avp |
| static char * | ruri_user_avp_param = NULL |
| static int | ruri_user_avp_type |
| static str | strip_col = str_init(STRIP_COL) |
| static str | tag_col = str_init(TAG_COL) |
| struct tm_binds | tmb |
| static str | transport_col = str_init(TRANSPORT_COL) |
| static str | uri_scheme_col = str_init(URI_SCHEME_COL) |
| static str | weight_col = str_init(WEIGHT_COL) |
| #define DEF_PING_TIMER 180 |
| #define GW_TABLE_VERSION 9 |
| #define LCR_TABLE_VERSION 2 |
| #define MAX_CODES 10 |
Definition at line 134 of file lcr_mod.c.
Referenced by add_code_to_array(), and check_options_callback().
| #define MAX_HOST_LEN 64 |
| #define MAX_NO_OF_GWS 128 |
| #define MAX_TAG_LEN 16 |
| #define MAX_USER_LEN 64 |
| #define Q_FLAG (1<<2) |
| typedef enum sip_protos uri_transport |
| int add_code_to_array | ( | str * | codes, | |
| int | local_codes[] | |||
| ) | [static] |
Definition at line 2636 of file lcr_mod.c.
References _str::len, LM_ERR, MAX_CODES, NULL, _str::s, str2int(), and trim_spaces_lr.
Referenced by mod_init().
| void add_gws_into_avps | ( | struct matched_gw_info * | matched_gws, | |
| unsigned int | gw_cnt, | |||
| str * | ruri_user | |||
| ) |
Definition at line 1697 of file lcr_mod.c.
References add_avp(), AVP_VAL_STR, encode_avp_value(), matched_gw_info::gw_index, gw_uri_avp_type, _str::len, LM_DBG, LM_ERR, MAX_URI_LEN, port, int_str::s, _str::s, and matched_gw_info::weight.
Referenced by do_load_gws(), and load_gws_from_grp().
| static void check_options_callback | ( | struct cell * | t, | |
| int | type, | |||
| struct tmcb_params * | ps | |||
| ) | [static] |
Callback-Function for the OPTIONS-Request This Function is called, as soon as the Transaction is finished (e. g. a Response came in, the timeout was hit, ...) Some part of this code was imported from dispatcher module.
Definition at line 2414 of file lcr_mod.c.
References tmcb_params::code, gw_set_state(), sip_uri::host, _str::len, LM_DBG, LM_ERR, MAX_CODES, negative_codes, NULL, tmcb_params::param, parse_uri(), positive_codes, _str::s, and cell::to.
Referenced by send_sip_options_request().
| int check_our_gws | ( | void | ) |
Definition at line 2533 of file lcr_mod.c.
References ip_addr::addr32, ip_addr::af, append_chr, append_str, int2str(), ip_addr2a(), _str::len, ip_addr::len, LM_DBG, LM_ERR, MAX_URI_SIZE, port, PROTO_NONE, PROTO_SCTP, PROTO_TCP, PROTO_TLS, PROTO_UDP, _str::s, send_sip_options_request(), SIP_URI_T, SIPS_URI_T, and ip_addr::u.
| static int comp_gw_grps | ( | const void * | _g1, | |
| const void * | _g2 | |||
| ) | [static] |
Definition at line 808 of file lcr_mod.c.
References gw_info::grp_id, and gw_info::ip_addr.
Referenced by reload_gws_and_lcrs().
| static int comp_gws | ( | const void * | _g1, | |
| const void * | _g2 | |||
| ) | [static] |
| static int comp_matched | ( | const void * | m1, | |
| const void * | m2 | |||
| ) | [static] |
Definition at line 752 of file lcr_mod.c.
References matched_gw_info::prefix_len, matched_gw_info::priority, and matched_gw_info::weight.
Referenced by do_load_gws(), and load_gws_from_grp().
| int decode_avp_value | ( | char * | value, | |
| str * | scheme, | |||
| unsigned int * | strip, | |||
| str * | tag, | |||
| str * | addr, | |||
| str * | hostname, | |||
| str * | port, | |||
| str * | transport, | |||
| unsigned int * | flags | |||
| ) | [inline] |
Definition at line 1588 of file lcr_mod.c.
References ip_addr::addr32, ip_addr::af, ip_addr2a(), ip_addr::len, _str::len, LM_ERR, NULL, PROTO_NONE, PROTO_TCP, PROTO_TLS, PROTO_UDP, _str::s, s, SIP_URI_T, str2int(), and ip_addr::u.
Referenced by generate_uris().
| static void destroy | ( | void | ) | [static] |
Definition at line 2158 of file lcr_mod.c.
References add_avp(), ip_addr::addr32, gw_info::flags, _pv_value::flags, flags_avp_type, gw_info::grp_id, gw_info::ip_addr, LM_DBG, LM_ERR, int_str::n, NULL, pv_get_spec_value(), PV_VAL_INT, PV_VAL_STR, sip_msg::rcv, _pv_value::ri, _pv_value::rs, receive_info::src_ip, str2ip(), and ip_addr::u.
Referenced by from_gw_0(), from_gw_1(), and from_gw_grp().
Definition at line 1742 of file lcr_mod.c.
References add_gws_into_avps(), AVP_VAL_STR, comp_matched(), lcr_info::first_gw, usr_avp::flags, sip_msg::from, lcr_info::from_uri_len, lcr_info::from_uri_re, get_from, matched_gw_info::gw_index, HDR_FROM_F, int2str(), lcr_hash_size_param, lcr_hash_table_lookup(), _str::len, LM_DBG, LM_ERR, int_str::n, lcr_info::next, NULL, parse_from_header(), parse_headers(), parse_sip_msg_uri(), sip_msg::parsed_uri, lcr_info::prefix, matched_gw_info::prefix_len, lcr_info::prefix_len, lcr_info::priority, matched_gw_info::priority, rpid_avp_type, _str::s, int_str::s, search_first_avp(), sip_uri::user, and matched_gw_info::weight.
Referenced by load_gws_0(), and load_gws_1().
Definition at line 2243 of file lcr_mod.c.
References ip_addr::addr32, _pv_value::flags, gw_info::grp_id, sip_uri::host, gw_info::ip_addr, _str::len, LM_DBG, LM_ERR, NULL, parse_sip_msg_uri(), sip_msg::parsed_uri, sip_msg::parsed_uri_ok, pv_get_spec_value(), PV_VAL_INT, PV_VAL_STR, _pv_value::ri, _pv_value::rs, str2ip(), and ip_addr::u.
Referenced by to_gw_0(), to_gw_1(), and to_gw_grp().
| int encode_avp_value | ( | char * | value, | |
| uri_type | scheme, | |||
| unsigned int | strip, | |||
| char * | tag, | |||
| unsigned int | tag_len, | |||
| unsigned int | ip_addr, | |||
| char * | hostname, | |||
| unsigned int | hostname_len, | |||
| unsigned int | port, | |||
| uri_transport | transport, | |||
| unsigned int | flags | |||
| ) | [inline] |
Definition at line 1546 of file lcr_mod.c.
References append_chr, append_str, int2str(), and len.
Referenced by add_gws_into_avps().
| static int find_first_gw | ( | struct gw_grp * | gw_grps, | |
| unsigned int | grp_cnt, | |||
| unsigned int | grp_id | |||
| ) | [static] |
Definition at line 919 of file lcr_mod.c.
References gw_grp::first.
Referenced by reload_gws_and_lcrs().
| static int fixstringloadgws | ( | void ** | param, | |
| int | param_count | |||
| ) | [static] |
Definition at line 712 of file lcr_mod.c.
References _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.
| static void free_shared_memory | ( | void | ) | [static] |
Definition at line 679 of file lcr_mod.c.
References lcr_hash_table_contents_free(), reload_lock, and shm_free.
Referenced by load_pcres(), and mod_init().
| static int from_gw_0 | ( | struct sip_msg * | _m, | |
| char * | _s1, | |||
| char * | _s2 | |||
| ) | [static] |
| static int from_gw_1 | ( | struct sip_msg * | _m, | |
| char * | _s1, | |||
| char * | _s2 | |||
| ) | [static] |
| static int from_gw_grp | ( | struct sip_msg * | _m, | |
| char * | _s1, | |||
| char * | _s2 | |||
| ) | [static] |
| static int generate_uris | ( | char * | r_uri, | |
| str * | r_uri_user, | |||
| unsigned int * | r_uri_len, | |||
| char * | dst_uri, | |||
| unsigned int * | dst_uri_len, | |||
| unsigned int * | flags | |||
| ) | [static] |
Definition at line 1968 of file lcr_mod.c.
References append_chr, append_str, decode_avp_value(), destroy_avp(), gw_uri_avp_type, _str::len, LM_DBG, LM_ERR, MAX_URI_LEN, port, _str::s, int_str::s, and search_first_avp().
Referenced by next_gw().
| int gw_set_state | ( | int | index, | |
| struct sip_uri * | uri, | |||
| int | ping | |||
| ) |
Definition at line 2337 of file lcr_mod.c.
References ip_addr::addr32, ip_addr::af, sip_uri::host, ip_addr2a(), _str::len, ip_addr::len, LM_DBG, LM_ERR, LM_NOTICE, port, sip_uri::port_no, _str::s, sip_uri::type, and ip_addr::u.
Referenced by check_options_callback().
| static int gw_unique | ( | const struct gw_info * | gws, | |
| const unsigned int | count, | |||
| const unsigned int | ip_addr, | |||
| const unsigned int | grp_id | |||
| ) | [static] |
| static int insert_gw | ( | struct gw_info * | gws, | |
| unsigned int | i, | |||
| unsigned int | ip_addr, | |||
| char * | hostname, | |||
| unsigned int | hostname_len, | |||
| unsigned int | grp_id, | |||
| char * | ip_string, | |||
| unsigned int | port, | |||
| unsigned int | scheme, | |||
| unsigned int | transport, | |||
| unsigned int | flags, | |||
| unsigned int | strip, | |||
| char * | tag, | |||
| unsigned int | tag_len, | |||
| unsigned short | weight, | |||
| unsigned short | ping | |||
| ) | [static] |
Definition at line 855 of file lcr_mod.c.
References gw_info::flags, gw_info::grp_id, gw_unique(), gw_info::hostname_len, gw_info::ip_addr, LM_ERR, gw_info::next, gw_info::ping, gw_info::port, gw_info::scheme, gw_info::strip, gw_info::tag_len, gw_info::transport, and gw_info::weight.
Referenced by reload_gws_and_lcrs().
| static int lcr_db_bind | ( | const str * | db_url | ) | [static] |
Definition at line 386 of file lcr_mod.c.
References db_bind_mod(), DB_CAP_QUERY, DB_CAPABILITY, and LM_ERR.
Referenced by mod_init().
| static void lcr_db_close | ( | void | ) | [static] |
| static int lcr_db_init | ( | const str * | db_url | ) | [static] |
Definition at line 368 of file lcr_mod.c.
References db_func::init, LM_CRIT, and LM_ERR.
Referenced by mi_child_init().
| static void link_gw_grps | ( | struct gw_info * | gws, | |
| struct gw_grp * | gw_grps, | |||
| unsigned int * | grp_cnt | |||
| ) | [static] |
Definition at line 892 of file lcr_mod.c.
References gw_grp::first, gw_grp::grp_id, gw_info::grp_id, gw_info::ip_addr, and gw_info::next.
Referenced by reload_gws_and_lcrs().
| static int load_gws_0 | ( | struct sip_msg * | _m, | |
| char * | _s1, | |||
| char * | _s2 | |||
| ) | [static] |
| static int load_gws_1 | ( | struct sip_msg * | _m, | |
| char * | _s1, | |||
| char * | _s2 | |||
| ) | [static] |
Definition at line 1876 of file lcr_mod.c.
References do_load_gws(), _pv_value::flags, _str::len, LM_DBG, NULL, pv_get_spec_value(), PV_VAL_STR, _pv_value::rs, and _str::s.
| static int load_gws_from_grp | ( | struct sip_msg * | _m, | |
| char * | _s1, | |||
| char * | _s2 | |||
| ) | [static] |
Definition at line 1904 of file lcr_mod.c.
References add_gws_into_avps(), comp_matched(), lcr_info::grp_id, matched_gw_info::gw_index, _str::len, LM_DBG, LM_ERR, next_index, NULL, parse_sip_msg_uri(), sip_msg::parsed_uri, matched_gw_info::prefix_len, matched_gw_info::priority, pv_printf_s(), _str::s, str2int(), sip_uri::user, and matched_gw_info::weight.
| static int mi_child_init | ( | void | ) | [static] |
| int mi_print_gws | ( | struct mi_node * | rpl | ) |
Definition at line 1394 of file lcr_mod.c.
References add_mi_attr(), add_mi_node_child(), addf_mi_attr(), ip_addr::addr32, ip_addr::af, int2str(), ip_addr2a(), ip_addr::len, len, MI_DUP_VALUE, NULL, port, PROTO_SCTP, PROTO_TCP, PROTO_TLS, PROTO_UDP, SIP_URI_T, and ip_addr::u.
Referenced by mi_lcr_gw_dump().
| int mi_print_lcrs | ( | struct mi_node * | rpl | ) |
Definition at line 1488 of file lcr_mod.c.
References add_mi_attr(), add_mi_node_child(), lcr_info::from_uri, lcr_info::from_uri_len, lcr_info::grp_id, int2str(), lcr_hash_size_param, len, MI_DUP_VALUE, lcr_info::next, NULL, lcr_info::prefix, lcr_info::prefix_len, and lcr_info::priority.
Referenced by mi_lcr_lcr_dump().
| static int mod_init | ( | void | ) | [static] |
Definition at line 420 of file lcr_mod.c.
References add_code_to_array(), db_func::close, db_check_table_version(), DEF_PING_TIMER, fetch_rows_param, flags_avp_param, flags_avp_type, free_shared_memory(), GW_TABLE_VERSION, gw_uri_avp_param, gw_uri_avp_type, db_func::init, gw_info::ip_addr, lcr_db_bind(), lcr_hash_size_param, LCR_TABLE_VERSION, _str::len, LM_CRIT, LM_DBG, LM_ERR, load_tm_api(), MAX_NO_OF_GWS, negative_codes, NULL, ping_interval, positive_codes, pv_get_avp_name(), pv_parse_spec(), _pv_spec::pvp, PVT_AVP, register_timer(), reload_gws_and_lcrs(), reload_lock, rpid_avp_param, rpid_avp_type, ruri_user_avp_param, ruri_user_avp_type, _str::s, s, shm_malloc(), tmb, and _pv_spec::type.
| static int next_gw | ( | struct sip_msg * | _m, | |
| char * | _s1, | |||
| char * | _s2 | |||
| ) | [static] |
Definition at line 2057 of file lcr_mod.c.
References add_avp(), APPEND_BRANCH_T, AVP_VAL_STR, do_action(), action::elem, flags_avp_type, generate_uris(), _str::len, LM_DBG, LM_ERR, MAX_URI_LEN, int_str::n, action::next, NULL, action_elem_::number, NUMBER_ST, parse_sip_msg_uri(), sip_msg::parsed_uri, REQUEST_ROUTE, route_type, ruri_user_avp_type, action_elem_::s, _str::s, int_str::s, search_first_avp(), SET_DSTURI_T, SET_URI_T, action_elem_::string, STRING_ST, action_elem_::type, action::type, action_elem_::u, and sip_uri::user.
| static int prefix_len_insert | ( | struct lcr_info ** | table, | |
| unsigned short | prefix_len | |||
| ) | [static] |
Definition at line 937 of file lcr_mod.c.
References lcr_hash_size_param, LM_ERR, lcr_info::next, NULL, lcr_info::prefix_len, and shm_malloc().
Referenced by reload_gws_and_lcrs().
| static pcre* reg_ex_comp | ( | const char * | pattern | ) | [static] |
| int reload_gws_and_lcrs | ( | void | ) |
Definition at line 981 of file lcr_mod.c.
References db_func::close, comp_gw_grps(), DB_CAP_FETCH, DB_CAPABILITY, DB_INT, DB_STRING, db_func::fetch_result, fetch_rows_param, find_first_gw(), gw_grp::first, lcr_info::first_gw, db_func::free_result, lcr_info::from_uri_len, lcr_info::grp_id, db_func::init, insert_gw(), gw_info::ip_addr, lcr_hash_table_contents_free(), lcr_hash_table_insert(), link_gw_grps(), LM_CRIT, LM_DBG, LM_ERR, MAX_HOST_LEN, MAX_PREFIX_LEN, MAX_TAG_LEN, MAX_URI_LEN, MAX_USER_LEN, NULL, port, prefix, lcr_info::prefix_len, prefix_len_insert(), priority, PROTO_NONE, PROTO_SCTP, PROTO_TCP, PROTO_TLS, PROTO_UDP, db_func::query, reg_ex_comp(), RES_ROW_N, RES_ROWS, ROW_VALUES, shm_free, SIP_URI_T, SIPS_URI_T, db_func::use_table, VAL_INT, VAL_NULL, VAL_STRING, and VAL_TYPE.
Referenced by mi_lcr_reload(), and mod_init().
| int send_sip_options_request | ( | str * | to, | |
| int | index | |||
| ) |
Definition at line 2487 of file lcr_mod.c.
References append_str, check_options_callback(), CRLF, CRLF_LEN, int2str(), _str::len, len, LM_ERR, NULL, pkg_free, pkg_malloc, _str::s, tm_binds::t_request, and tmb.
Referenced by check_our_gws().
| static void timer | ( | unsigned int | ticks, | |
| void * | param | |||
| ) | [static] |
| static int to_gw_0 | ( | struct sip_msg * | _m, | |
| char * | _s1, | |||
| char * | _s2 | |||
| ) | [static] |
| static int to_gw_1 | ( | struct sip_msg * | _m, | |
| char * | _s1, | |||
| char * | _s2 | |||
| ) | [static] |
| static int to_gw_grp | ( | struct sip_msg * | _m, | |
| char * | _s1, | |||
| char * | _s2 | |||
| ) | [static] |
cmd_export_t cmds[] [static] |
| struct module_exports exports |
int fetch_rows_param = DEF_FETCH_ROWS [static] |
char* flags_avp_param = NULL [static] |
int flags_avp_type [static] |
Definition at line 202 of file lcr_mod.c.
Referenced by db_insert_ucontact(), db_load_urecord(), db_update_ucontact(), and preload_udomain().
str from_uri_col = str_init(FROM_URI_COL) [static] |
str grp_id_col = str_init(GRP_ID_COL) [static] |
str gw_name_col = str_init(GW_NAME_COL) [static] |
int_str gw_uri_avp [static] |
char* gw_uri_avp_param = NULL [static] |
int gw_uri_avp_type [static] |
Definition at line 240 of file lcr_mod.c.
Referenced by add_gws_into_avps(), generate_uris(), and mod_init().
str hostname_col = str_init(HOSTNAME_COL) [static] |
str ip_addr_col = str_init(IP_ADDR_COL) [static] |
| unsigned int lcr_hash_size_param = DEF_LCR_HASH_SIZE |
Definition at line 234 of file lcr_mod.c.
Referenced by do_load_gws(), lcr_hash_table_contents_free(), mi_print_lcrs(), mod_init(), and prefix_len_insert().
mi_export_t mi_cmds[] [static] |
| int negative_codes[MAX_CODES] |
str negative_codes_str = {"408", 3} [static] |
param_export_t params[] [static] |
| int ping_interval = 0 |
str ping_method = {"OPTIONS", 7} [static] |
Definition at line 196 of file lcr_mod.c.
Referenced by query_xcap_update(), and reload_address_table().
| int positive_codes[MAX_CODES] |
str positive_codes_str = {"200;501;403;404", 15} [static] |
str prefix_col = str_init(PREFIX_COL) [static] |
str priority_col = str_init(PRIORITY_COL) [static] |
| gen_lock_t* reload_lock |
Definition at line 183 of file lcr_mod.c.
Referenced by free_shared_memory(), load_pcres(), mi_lcr_reload(), mod_init(), and w_pcre_match_group().
char* rpid_avp_param = NULL [static] |
int rpid_avp_type [static] |
int_str ruri_user_avp [static] |
char* ruri_user_avp_param = NULL [static] |
int ruri_user_avp_type [static] |
Definition at line 200 of file lcr_mod.c.
Referenced by allow_trusted(), and reload_trusted_table().
str transport_col = str_init(TRANSPORT_COL) [static] |
str uri_scheme_col = str_init(URI_SCHEME_COL) [static] |
str weight_col = str_init(WEIGHT_COL) [static] |
1.5.6