dlg_hash.h File Reference

#include "../../locking.h"
#include "../../mi/mi.h"
#include "dlg_timer.h"
#include "dlg_cb.h"

Include dependency graph for dlg_hash.h:

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

Go to the source code of this file.

Data Structures

struct  dlg_cell
struct  dlg_entry
struct  dlg_table

Defines

#define DLG_CALLEE_LEG   1
#define DLG_CALLER_LEG   0
#define DLG_DIR_DOWNSTREAM   1
#define DLG_DIR_NONE   0
#define DLG_DIR_UPSTREAM   2
#define DLG_EVENT_REQ   8
#define DLG_EVENT_REQACK   6
#define DLG_EVENT_REQBYE   7
#define DLG_EVENT_REQPRACK   5
#define DLG_EVENT_RPL1xx   2
#define DLG_EVENT_RPL2xx   3
#define DLG_EVENT_RPL3xx   4
#define DLG_EVENT_TDEL   1
#define DLG_FLAG_CALLEEBYE   (1<<5)
#define DLG_FLAG_CALLERBYE   (1<<4)
#define DLG_FLAG_CHANGED   (1<<1)
#define DLG_FLAG_HASBYE   (1<<2)
#define DLG_FLAG_LOCALDLG   (1<<6)
#define DLG_FLAG_NEW   (1<<0)
#define DLG_FLAG_TOBYE   (1<<3)
#define dlg_lock(_table, _entry)   lock_set_get( (_table)->locks, (_entry)->lock_idx);
#define DLG_STATE_CONFIRMED   4
#define DLG_STATE_CONFIRMED_NA   3
#define DLG_STATE_DELETED   5
#define DLG_STATE_EARLY   2
#define DLG_STATE_UNCONFIRMED   1
#define dlg_unlock(_table, _entry)   lock_set_release( (_table)->locks, (_entry)->lock_idx);
#define ref_dlg_unsafe(_dlg, _cnt)
#define unref_dlg_unsafe(_dlg, _cnt, _d_entry)

Functions

struct dlg_cellbuild_new_dlg (str *callid, str *from_uri, str *to_uri, str *from_tag)
void destroy_dlg (struct dlg_cell *dlg)
void destroy_dlg_table (void)
int dlg_set_leg_info (struct dlg_cell *dlg, str *tag, str *rr, str *contact, str *cseq, unsigned int leg)
int dlg_update_cseq (struct dlg_cell *dlg, unsigned int leg, str *cseq)
struct dlg_cellget_dlg (str *callid, str *ftag, str *ttag, unsigned int *dir)
int init_dlg_table (unsigned int size)
void link_dlg (struct dlg_cell *dlg, int n)
struct dlg_celllookup_dlg (unsigned int h_entry, unsigned int h_id)
static int match_dialog (struct dlg_cell *dlg, str *callid, str *ftag, str *ttag, unsigned int *dir)
static int match_downstream_dialog (struct dlg_cell *dlg, str *callid, str *ftag)
int mi_print_dlg (struct mi_node *rpl, struct dlg_cell *dlg, int with_context)
struct mi_rootmi_print_dlgs (struct mi_root *cmd, void *param)
struct mi_rootmi_print_dlgs_ctx (struct mi_root *cmd, void *param)
void next_state_dlg (struct dlg_cell *dlg, int event, int *old_state, int *new_state, int *unref)
void ref_dlg (struct dlg_cell *dlg, unsigned int cnt)
void unlink_unsafe_dlg (struct dlg_entry *d_entry, struct dlg_cell *dlg)
void unref_dlg (struct dlg_cell *dlg, unsigned int cnt)

Variables

struct dlg_cellcurrent_dlg_pointer
struct dlg_tabled_table


Define Documentation

#define DLG_CALLEE_LEG   1

#define DLG_CALLER_LEG   0

#define DLG_DIR_DOWNSTREAM   1

#define DLG_DIR_NONE   0

#define DLG_DIR_UPSTREAM   2

#define DLG_EVENT_REQ   8

Definition at line 60 of file dlg_hash.h.

Referenced by dlg_onroute(), and next_state_dlg().

#define DLG_EVENT_REQACK   6

Definition at line 58 of file dlg_hash.h.

Referenced by dlg_onroute(), and next_state_dlg().

#define DLG_EVENT_REQBYE   7

Definition at line 59 of file dlg_hash.h.

Referenced by bye_reply_cb(), dlg_onroute(), dlg_ontimeout(), and next_state_dlg().

#define DLG_EVENT_REQPRACK   5

Definition at line 57 of file dlg_hash.h.

Referenced by dlg_onroute(), and next_state_dlg().

#define DLG_EVENT_RPL1xx   2

Definition at line 54 of file dlg_hash.h.

Referenced by dlg_onreply(), and next_state_dlg().

#define DLG_EVENT_RPL2xx   3

Definition at line 55 of file dlg_hash.h.

Referenced by dlg_onreply(), and next_state_dlg().

#define DLG_EVENT_RPL3xx   4

Definition at line 56 of file dlg_hash.h.

Referenced by dlg_onreply(), and next_state_dlg().

#define DLG_EVENT_TDEL   1

Definition at line 53 of file dlg_hash.h.

Referenced by dlg_onreply(), and next_state_dlg().

#define DLG_FLAG_CALLEEBYE   (1<<5)

Definition at line 67 of file dlg_hash.h.

Referenced by dlg_bye().

#define DLG_FLAG_CALLERBYE   (1<<4)

Definition at line 66 of file dlg_hash.h.

Referenced by dlg_bye().

#define DLG_FLAG_CHANGED   (1<<1)

Definition at line 63 of file dlg_hash.h.

Referenced by dialog_update_db(), dlg_onroute(), and update_dialog_dbinfo().

#define DLG_FLAG_HASBYE   (1<<2)

Definition at line 64 of file dlg_hash.h.

Referenced by next_state_dlg().

#define DLG_FLAG_LOCALDLG   (1<<6)

Definition at line 68 of file dlg_hash.h.

#define DLG_FLAG_NEW   (1<<0)

#define DLG_FLAG_TOBYE   (1<<3)

Definition at line 65 of file dlg_hash.h.

Referenced by dlg_new_dialog(), and dlg_ontimeout().

#define dlg_lock ( _table,
_entry   )     lock_set_get( (_table)->locks, (_entry)->lock_idx);

#define DLG_STATE_CONFIRMED   4

#define DLG_STATE_CONFIRMED_NA   3

#define DLG_STATE_DELETED   5

#define DLG_STATE_EARLY   2

Definition at line 48 of file dlg_hash.h.

Referenced by dlg_onreply(), load_dialog_info_from_db(), and next_state_dlg().

#define DLG_STATE_UNCONFIRMED   1

Definition at line 47 of file dlg_hash.h.

Referenced by build_new_dlg(), and next_state_dlg().

#define dlg_unlock ( _table,
_entry   )     lock_set_release( (_table)->locks, (_entry)->lock_idx);

#define ref_dlg_unsafe ( _dlg,
_cnt   ) 

Value:

do { \
      (_dlg)->ref += (_cnt); \
      LM_DBG("ref dlg %p with %d -> %d\n", \
         (_dlg),(_cnt),(_dlg)->ref); \
   }while(0)

Definition at line 137 of file dlg_hash.h.

Referenced by next_state_dlg(), and ref_dlg().

#define unref_dlg_unsafe ( _dlg,
_cnt,
_d_entry   ) 

Definition at line 144 of file dlg_hash.h.

Referenced by next_state_dlg(), and unref_dlg().


Function Documentation

struct dlg_cell* build_new_dlg ( str callid,
str from_uri,
str to_uri,
str from_tag 
) [read]

void destroy_dlg ( struct dlg_cell dlg  )  [inline]

void destroy_dlg_table ( void   ) 

int dlg_set_leg_info ( struct dlg_cell dlg,
str tag,
str rr,
str contact,
str cseq,
unsigned int  leg 
)

int dlg_update_cseq ( struct dlg_cell dlg,
unsigned int  leg,
str cseq 
)

Definition at line 281 of file dlg_hash.c.

References dlg_cell::cseq, _str::len, LM_DBG, LM_ERR, NULL, _str::s, shm_free, and shm_malloc().

Referenced by update_cseqs().

struct dlg_cell* get_dlg ( str callid,
str ftag,
str ttag,
unsigned int *  dir 
) [read]

Definition at line 382 of file dlg_hash.c.

References core_hash(), internal_get_dlg(), _str::len, LM_DBG, _str::s, and dlg_table::size.

Referenced by dlg_onroute(), and w_dlg_get().

int init_dlg_table ( unsigned int  size  ) 

void link_dlg ( struct dlg_cell dlg,
int  n 
)

struct dlg_cell* lookup_dlg ( unsigned int  h_entry,
unsigned int  h_id 
) [read]

static int match_dialog ( struct dlg_cell dlg,
str callid,
str ftag,
str ttag,
unsigned int *  dir 
) [inline, static]

static int match_downstream_dialog ( struct dlg_cell dlg,
str callid,
str ftag 
) [inline, static]

Definition at line 278 of file dlg_hash.h.

References dlg_cell::callid, DLG_CALLER_LEG, _str::len, _str::s, and dlg_cell::tag.

Referenced by process_mi_params().

int mi_print_dlg ( struct mi_node rpl,
struct dlg_cell dlg,
int  with_context 
)

Definition at line 750 of file dlg_hash.c.

References internal_mi_print_dlg().

Referenced by mi_profile_list().

struct mi_root* mi_print_dlgs ( struct mi_root cmd,
void *  param 
) [read]

struct mi_root* mi_print_dlgs_ctx ( struct mi_root cmd,
void *  param 
) [read]

void next_state_dlg ( struct dlg_cell dlg,
int  event,
int *  old_state,
int *  new_state,
int *  unref 
)

void ref_dlg ( struct dlg_cell dlg,
unsigned int  cnt 
)

void unlink_unsafe_dlg ( struct dlg_entry d_entry,
struct dlg_cell dlg 
) [inline]

Definition at line 425 of file dlg_hash.c.

References dlg_entry::first, dlg_entry::last, dlg_cell::next, and dlg_cell::prev.

void unref_dlg ( struct dlg_cell dlg,
unsigned int  cnt 
)


Variable Documentation

global dialog

Definition at line 57 of file dlg_profile.c.

Referenced by dlg_new_dialog(), dlg_onreq(), dlg_onroute(), and w_dlg_get().

struct dlg_table* d_table


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