permissions/hash.h File Reference

#include <stdio.h>
#include "../../parser/msg_parser.h"
#include "../../str.h"
#include "../../usr_avp.h"
#include "../../mi/mi.h"

Include dependency graph for permissions/hash.h:

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

Go to the source code of this file.

Data Structures

struct  addr_list
struct  subnet
struct  trusted_list

Defines

#define PERM_HASH_SIZE   128
#define PERM_MAX_SUBNETS   128

Functions

int addr_hash_table_insert (struct addr_list **hash_table, unsigned int grp, unsigned int ip_addr, unsigned int port)
int addr_hash_table_mi_print (struct addr_list **hash_table, struct mi_node *rpl)
void addr_hash_table_print (struct addr_list **hash_table, FILE *reply_file)
void destroy_addr_hash_table (struct addr_list **table)
void destroy_hash_table (struct trusted_list **table)
void empty_addr_hash_table (struct addr_list **hash_table)
void empty_hash_table (struct trusted_list **hash_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 **hash_table, char *src_ip, char *proto, char *pattern, char *tag)
int hash_table_mi_print (struct trusted_list **hash_table, struct mi_node *rpl)
void hash_table_print (struct trusted_list **hash_table, FILE *reply_file)
int init_tag_avp (str *tag_avp_param)
int match_addr_hash_table (struct addr_list **table, unsigned int grp, unsigned int ip_addr, unsigned int port)
int match_hash_table (struct trusted_list **table, struct sip_msg *msg, char *scr_ip, int proto)
int match_subnet_table (struct subnet *table, unsigned int group, 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)
void subnet_table_print (struct subnet *table, FILE *reply_file)


Define Documentation

#define PERM_HASH_SIZE   128

#define PERM_MAX_SUBNETS   128


Function Documentation

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

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

void addr_hash_table_print ( struct addr_list **  hash_table,
FILE *  reply_file 
)

void destroy_addr_hash_table ( struct addr_list **  table  ) 

void destroy_hash_table ( struct trusted_list **  table  ) 

void empty_addr_hash_table ( struct addr_list **  hash_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 **  hash_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 **  hash_table,
char *  src_ip,
char *  proto,
char *  pattern,
char *  tag 
)

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

void hash_table_print ( struct trusted_list **  hash_table,
FILE *  reply_file 
)

int init_tag_avp ( str tag_avp_param  ) 

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

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

int match_subnet_table ( struct subnet table,
unsigned int  group,
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 
)

void subnet_table_print ( struct subnet table,
FILE *  reply_file 
)


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