permissions/hash.c File Reference

#include <sys/types.h>
#include <regex.h>
#include "../../mem/shm_mem.h"
#include "../../parser/parse_from.h"
#include "../../ut.h"
#include "../../hash_func.h"
#include "../../usr_avp.h"
#include "../../ip_addr.h"
#include "../../pvar.h"
#include "hash.h"
#include "trusted.h"
#include "address.h"

Include dependency graph for permissions/hash.c:

Go to the source code of this file.

Defines

#define perm_hash(_s)   core_hash( &(_s), 0, PERM_HASH_SIZE)

Functions

int addr_hash_table_insert (struct addr_list **table, unsigned int grp, unsigned int ip_addr, unsigned int port)
int addr_hash_table_mi_print (struct addr_list **table, struct mi_node *rpl)
void empty_addr_hash_table (struct addr_list **table)
void empty_hash_table (struct trusted_list **table)
void empty_subnet_table (struct subnet *table)
int find_group_in_addr_hash_table (struct addr_list **table, unsigned int ip_addr, unsigned int port)
int find_group_in_subnet_table (struct subnet *table, unsigned int ip_addr, unsigned int port)
void free_addr_hash_table (struct addr_list **table)
void free_hash_table (struct trusted_list **table)
void free_subnet_table (struct subnet *table)
void get_tag_avp (int_str *tag_avp_p, int *tag_avp_type_p)
int hash_table_insert (struct trusted_list **table, char *src_ip, char *proto, char *pattern, char *tag)
int hash_table_mi_print (struct trusted_list **table, struct mi_node *rpl)
int init_tag_avp (str *tag_avp_param)
int match_addr_hash_table (struct addr_list **table, unsigned int group, unsigned int ip_addr, unsigned int port)
int match_hash_table (struct trusted_list **table, struct sip_msg *msg, char *src_ip_c_str, int proto)
int match_subnet_table (struct subnet *table, unsigned int grp, unsigned int ip_addr, unsigned int port)
struct addr_list ** new_addr_hash_table (void)
struct trusted_list ** new_hash_table (void)
struct subnetnew_subnet_table (void)
int subnet_table_insert (struct subnet *table, unsigned int grp, unsigned int subnet, unsigned int mask, unsigned int port)
int subnet_table_mi_print (struct subnet *table, struct mi_node *rpl)

Variables

static int_str tag_avp
static int tag_avp_type


Define Documentation

#define perm_hash ( _s   )     core_hash( &(_s), 0, PERM_HASH_SIZE)


Function Documentation

int addr_hash_table_insert ( struct addr_list **  table,
unsigned int  grp,
unsigned int  ip_addr,
unsigned int  port 
)

int addr_hash_table_mi_print ( struct addr_list **  table,
struct mi_node rpl 
)

void empty_addr_hash_table ( struct addr_list **  table  ) 

Definition at line 449 of file permissions/hash.c.

References addr_list::next, PERM_HASH_SIZE, and shm_free.

Referenced by free_addr_hash_table(), and reload_address_table().

void empty_hash_table ( struct trusted_list **  table  ) 

void empty_subnet_table ( struct subnet table  ) 

Definition at line 607 of file permissions/hash.c.

References subnet::grp, and PERM_MAX_SUBNETS.

Referenced by reload_address_table().

int find_group_in_addr_hash_table ( struct addr_list **  table,
unsigned int  ip_addr,
unsigned int  port 
)

int find_group_in_subnet_table ( struct subnet table,
unsigned int  ip_addr,
unsigned int  port 
)

Definition at line 559 of file permissions/hash.c.

References subnet::grp, subnet::mask, and PERM_MAX_SUBNETS.

Referenced by allow_source_address_group().

void free_addr_hash_table ( struct addr_list **  table  ) 

Definition at line 329 of file permissions/hash.c.

References empty_addr_hash_table(), and shm_free.

Referenced by clean_addresses(), and init_addresses().

void free_hash_table ( struct trusted_list **  table  ) 

Definition at line 105 of file permissions/hash.c.

References empty_hash_table(), and shm_free.

Referenced by clean_trusted(), init_hash_table(), init_trusted(), and tm_shutdown().

void free_subnet_table ( struct subnet table  ) 

Definition at line 616 of file permissions/hash.c.

References shm_free.

Referenced by clean_addresses(), and init_addresses().

void get_tag_avp ( int_str tag_avp_p,
int *  tag_avp_type_p 
)

Definition at line 75 of file permissions/hash.c.

References tag_avp_type.

Referenced by match_res().

int hash_table_insert ( struct trusted_list **  table,
char *  src_ip,
char *  proto,
char *  pattern,
char *  tag 
)

int hash_table_mi_print ( struct trusted_list **  table,
struct mi_node rpl 
)

int init_tag_avp ( str tag_avp_param  ) 

int match_addr_hash_table ( struct addr_list **  table,
unsigned int  group,
unsigned int  ip_addr,
unsigned int  port 
)

int match_hash_table ( struct trusted_list **  table,
struct sip_msg msg,
char *  src_ip_c_str,
int  proto 
)

int match_subnet_table ( struct subnet table,
unsigned int  grp,
unsigned int  ip_addr,
unsigned int  port 
)

Definition at line 529 of file permissions/hash.c.

References subnet::grp, mask, and PERM_MAX_SUBNETS.

Referenced by allow_address(), and allow_source_address().

struct addr_list** new_addr_hash_table ( void   )  [read]

Definition at line 309 of file permissions/hash.c.

References LM_ERR, PERM_HASH_SIZE, and shm_malloc().

Referenced by init_addresses().

struct trusted_list** new_hash_table ( void   )  [read]

struct subnet* new_subnet_table ( void   )  [read]

Definition at line 469 of file permissions/hash.c.

References subnet::grp, LM_ERR, PERM_MAX_SUBNETS, and shm_malloc().

Referenced by init_addresses(), and reload_address_table().

int subnet_table_insert ( struct subnet table,
unsigned int  grp,
unsigned int  subnet,
unsigned int  mask,
unsigned int  port 
)

int subnet_table_mi_print ( struct subnet table,
struct mi_node rpl 
)


Variable Documentation

int_str tag_avp [static]

Definition at line 41 of file permissions/hash.c.

Referenced by match_res().

int tag_avp_type [static]

Definition at line 40 of file permissions/hash.c.

Referenced by get_tag_avp(), init_tag_avp(), match_hash_table(), and match_res().


Generated on Thu May 24 02:00:38 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6