dispatch.h File Reference

Dispatcher :: Dispatch. More...

#include <stdio.h>
#include "../../pvar.h"
#include "../../parser/msg_parser.h"
#include "../tm/tm_load.h"

Include dependency graph for dispatch.h:

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

Go to the source code of this file.

Defines

#define DS_FAILOVER_ON   2
#define DS_HASH_USER_ONLY   1
#define DS_INACTIVE_DST   1
#define DS_PROBING_DST   2
#define DS_RESET_FAIL_DST   4

Functions

void ds_check_timer (unsigned int ticks, void *param)
 Timer for checking inactive destinations.
int ds_connect_db (void)
int ds_destroy_list (void)
 called from dispatcher.c: free all
void ds_disconnect_db (void)
int ds_is_from_list (struct sip_msg *_m, int group)
int ds_load_db (void)
 load groups of destinations from DB
int ds_load_list (char *lfile)
 load groups of destinations from file
int ds_mark_dst (struct sip_msg *msg, int mode)
int ds_next_dst (struct sip_msg *msg, int mode)
int ds_print_list (FILE *fout)
int ds_print_mi_list (struct mi_node *rpl)
int ds_select_dst (struct sip_msg *msg, int set, int alg, int mode)
int ds_set_state (int group, str *address, int state, int type)
int init_data (void)
int init_ds_db (void)
 Initialize and verify DB stuff.

Variables

int_str cnt_avp_name
unsigned short cnt_avp_type
int ds_append_branch
str ds_db_url
str ds_dest_flags_col
str ds_dest_priority_col
str ds_dest_uri_col
int ds_flags
str ds_ping_from
str ds_ping_method
int ds_probing_mode
str ds_set_id_col
pv_spec_t ds_setid_pv
str ds_setid_pvname
str ds_table_name
int ds_use_default
int_str dst_avp_name
unsigned short dst_avp_type
int_str grp_avp_name
unsigned short grp_avp_type
pv_elem_thash_param_model
int probing_threshhold
struct tm_binds tmb


Detailed Description

Dispatcher :: Dispatch.

Id
dispatch.h 5456 2009-01-14 11:52:18Z miconda

dispatcher module

Copyright (C) 2004-2006 FhG Fokus

This file is part of Kamailio, a free SIP server.

Kamailio is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version

Kamailio is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

History ------- 2004-07-31 first version, by daniel 2007-01-11 Added a function to check if a specific gateway is in a group (carsten) 2007-02-09 Added active probing of failed destinations and automatic re-enabling of destinations 2007-05-08 Ported the changes to SVN-Trunk and renamed ds_is_domain to ds_is_from_list.

Definition in file dispatch.h.


Define Documentation

#define DS_FAILOVER_ON   2

store the other dest in avps

Definition at line 50 of file dispatch.h.

Referenced by ds_mark_dst(), ds_next_dst(), and ds_select_dst().

#define DS_HASH_USER_ONLY   1

use only the uri user part for hashing

Definition at line 49 of file dispatch.h.

Referenced by get_uri_hash_keys().

#define DS_INACTIVE_DST   1

inactive destination

Definition at line 52 of file dispatch.h.

Referenced by ds_mark_dst(), ds_mi_set(), ds_options_callback(), ds_print_list(), ds_print_mi_list(), ds_select_dst(), and ds_set_state().

#define DS_PROBING_DST   2

checking destination

Definition at line 53 of file dispatch.h.

Referenced by ds_check_timer(), ds_mark_dst(), ds_options_callback(), ds_print_list(), ds_print_mi_list(), ds_select_dst(), and ds_set_state().

#define DS_RESET_FAIL_DST   4

Reset-Failure-Counter

Definition at line 54 of file dispatch.h.

Referenced by ds_options_callback(), and ds_set_state().


Function Documentation

void ds_check_timer ( unsigned int  ticks,
void *  param 
)

Timer for checking inactive destinations.

This timer is regularly fired.

Definition at line 1624 of file dispatch.c.

References _ds_list, _ds_list_nr, _ds_set::dlist, ds_options_callback(), ds_ping_from, ds_ping_method, DS_PROBING_DST, ds_probing_mode, _ds_dest::flags, _ds_set::id, _str::len, LM_DBG, LM_ERR, _ds_set::next, _ds_set::nr, NULL, _str::s, tm_binds::t_request, tmb, and _ds_dest::uri.

Referenced by mod_init().

int ds_connect_db ( void   ) 

Definition at line 453 of file dispatch.c.

References ds_db_url, db_func::init, LM_CRIT, and _str::s.

Referenced by init_ds_db(), and mi_child_init().

int ds_destroy_list ( void   ) 

called from dispatcher.c: free all

Definition at line 627 of file dispatch.c.

References crt_idx, destroy_list(), and shm_free.

Referenced by destroy().

void ds_disconnect_db ( void   ) 

Definition at line 471 of file dispatch.c.

References db_func::close.

Referenced by destroy(), and init_ds_db().

int ds_is_from_list ( struct sip_msg _m,
int  group 
)

int ds_load_db ( void   ) 

int ds_load_list ( char *  lfile  ) 

load groups of destinations from file

Definition at line 329 of file dispatch.c.

References _ds_list_nr, add_dest2list(), crt_idx, destroy_list(), ds_print_sets(), id, _str::len, LM_ERR, LM_WARN, next_idx, NULL, priority, reindex_dests(), and _str::s.

Referenced by ds_mi_reload(), and mod_init().

int ds_mark_dst ( struct sip_msg msg,
int  mode 
)

int ds_next_dst ( struct sip_msg msg,
int  mode 
)

int ds_print_list ( FILE *  fout  ) 

int ds_print_mi_list ( struct mi_node rpl  ) 

int ds_select_dst ( struct sip_msg msg,
int  set,
int  alg,
int  mode 
)

int ds_set_state ( int  group,
str address,
int  state,
int  type 
)

int init_data ( void   ) 

Definition at line 137 of file dp_db.c.

References crt_idx, ds_list_nr, init_db_data(), LM_DBG, LM_ERR, next_idx, and shm_malloc().

int init_ds_db ( void   ) 


Variable Documentation

Definition at line 90 of file dispatcher.c.

Referenced by ds_select_dst().

unsigned short cnt_avp_type

Definition at line 91 of file dispatcher.c.

Referenced by ds_select_dst(), and mod_init().

Definition at line 101 of file dispatcher.c.

Referenced by ds_update_dst().

Definition at line 104 of file dispatcher.c.

Referenced by ds_connect_db(), and init_ds_db().

Definition at line 107 of file dispatcher.c.

Referenced by ds_load_db().

Definition at line 108 of file dispatcher.c.

Referenced by ds_load_db().

Definition at line 106 of file dispatcher.c.

Referenced by ds_load_db().

int ds_flags

Definition at line 98 of file dispatcher.c.

Referenced by ds_check_timer().

Definition at line 97 of file dispatcher.c.

Referenced by ds_check_timer().

Definition at line 100 of file dispatcher.c.

Referenced by ds_check_timer(), and ds_options_callback().

Definition at line 105 of file dispatcher.c.

Referenced by ds_load_db().

Definition at line 112 of file dispatcher.c.

Referenced by ds_is_from_list().

Definition at line 111 of file dispatcher.c.

Referenced by ds_is_from_list().

Definition at line 109 of file dispatcher.c.

Referenced by ds_load_db(), and init_ds_db().

Definition at line 80 of file dispatcher.c.

Referenced by ds_select_dst().

unsigned short dst_avp_type

Definition at line 88 of file dispatcher.c.

Referenced by ds_mark_dst(), and ds_select_dst().

unsigned short grp_avp_type

Definition at line 89 of file dispatcher.c.

Referenced by ds_mark_dst(), ds_select_dst(), and mod_init().

Definition at line 93 of file dispatcher.c.

Referenced by ds_hash_pvar().

number of failed requests, before a destination is taken into probing

Definition at line 95 of file dispatcher.c.

Referenced by ds_print_list(), and ds_set_state().

struct tm_binds tmb

TM bind

Definition at line 79 of file dispatch.h.


Generated on Tue May 22 16:00:38 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6