h_table.c File Reference

TM :: Hash tables. More...

#include <stdlib.h>
#include "../../mem/shm_mem.h"
#include "../../hash_func.h"
#include "../../dprint.h"
#include "../../md5utils.h"
#include "../../ut.h"
#include "../../error.h"
#include "t_reply.h"
#include "t_cancel.h"
#include "t_stats.h"
#include "h_table.h"
#include "fix_lumps.h"
#include "t_hooks.h"
#include "t_fwd.h"

Include dependency graph for h_table.c:

Go to the source code of this file.

Functions

struct cellbuild_cell (struct sip_msg *p_msg)
void free_cell (struct cell *dead_cell)
void free_hash_table (void)
 Release all the data contained by the hash table. All the aux. structures as sems, lists, etc, are also released.
enum kill_reason get_kr (void)
struct s_tableget_tm_table (void)
static void init_branches (struct cell *t)
struct s_tableinit_hash_table (void)
static void init_synonym_id (struct cell *t)
void insert_into_hash_table_unsafe (struct cell *p_cell, unsigned int _hash)
 Takes an already created cell and links it into hash table on the appropriate entry.
void lock_hash (int i)
void remove_from_hash_table_unsafe (struct cell *p_cell)
 Un-link a cell from hash_table, but the cell itself is not released.
void reset_kr (void)
void set_kr (enum kill_reason _kr)
unsigned int transaction_count (void)
void unlock_hash (int i)

Variables

static enum kill_reason kr
int syn_branch = 1
static struct s_tabletm_table
 pointer to the big table where all the transaction data lives


Detailed Description

TM :: Hash tables.

Definition in file h_table.c.


Function Documentation

struct cell* build_cell ( struct sip_msg p_msg  )  [read]

void free_cell ( struct cell dead_cell  ) 

void free_hash_table ( void   ) 

Release all the data contained by the hash table. All the aux. structures as sems, lists, etc, are also released.

Definition at line 329 of file h_table.c.

References s_table::entrys, entry::first_cell, free_cell(), cell::next_cell, shm_free, and TM_TABLE_ENTRIES.

enum kill_reason get_kr ( void   ) 

Definition at line 87 of file h_table.c.

References kr.

Referenced by t_unref().

struct s_table* get_tm_table ( void   )  [read]

static void init_branches ( struct cell t  )  [inline, static]

struct s_table* init_hash_table ( void   )  [read]

static void init_synonym_id ( struct cell t  )  [inline, static]

Definition at line 193 of file h_table.c.

References char_msg_val(), int2reverse_hex(), cell::md5, MD5_LEN, ua_server::request, syn_branch, and cell::uas.

Referenced by build_cell().

void insert_into_hash_table_unsafe ( struct cell p_cell,
unsigned int  _hash 
)

Takes an already created cell and links it into hash table on the appropriate entry.

Definition at line 390 of file h_table.c.

References entry::acc_entries, entry::cur_entries, s_table::entrys, entry::first_cell, cell::hash_index, is_local, cell::label, entry::last_cell, cell::next_cell, entry::next_label, cell::prev_cell, and stats_trans_new.

Referenced by new_t(), t_uac(), and t_uac_cancel().

void lock_hash ( int  i  ) 

Definition at line 92 of file h_table.c.

References s_table::entrys, lock, and entry::mutex.

void remove_from_hash_table_unsafe ( struct cell p_cell  ) 

Un-link a cell from hash_table, but the cell itself is not released.

Definition at line 416 of file h_table.c.

References entry::cur_entries, s_table::entrys, entry::first_cell, cell::hash_index, if_update_stat, entry::last_cell, LM_CRIT, cell::next_cell, cell::prev_cell, tm_enable_stats, and tm_trans_inuse.

Referenced by t_uac(), t_uac_cancel(), and wait_handler().

void reset_kr ( void   ) 

Definition at line 76 of file h_table.c.

References kr.

Referenced by script_init().

void set_kr ( enum kill_reason  _kr  ) 

unsigned int transaction_count ( void   ) 

Definition at line 110 of file h_table.c.

References entry::cur_entries, s_table::entrys, and TM_TABLE_ENTRIES.

void unlock_hash ( int  i  ) 

Definition at line 98 of file h_table.c.

References s_table::entrys, entry::mutex, and unlock.


Variable Documentation

enum kill_reason kr [static]

Definition at line 67 of file h_table.c.

Referenced by get_kr(), reset_kr(), set_kr(), and t_unref().

int syn_branch = 1

Definition at line 73 of file h_table.c.

Referenced by init_synonym_id(), t_calc_branch(), and t_reply_matching().

struct s_table* tm_table [static]

pointer to the big table where all the transaction data lives

Definition at line 71 of file h_table.c.


Generated on Wed May 23 06:01:04 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6