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


Go to the source code of this file.
| #define PERM_HASH_SIZE 128 |
Definition at line 34 of file permissions/hash.h.
Referenced by addr_hash_table_mi_print(), empty_addr_hash_table(), empty_hash_table(), hash_table_mi_print(), new_addr_hash_table(), and new_hash_table().
| #define PERM_MAX_SUBNETS 128 |
Definition at line 173 of file permissions/hash.h.
Referenced by empty_subnet_table(), find_group_in_subnet_table(), match_subnet_table(), new_subnet_table(), subnet_table_insert(), and subnet_table_mi_print().
| int addr_hash_table_insert | ( | struct addr_list ** | hash_table, | |
| unsigned int | grp, | |||
| unsigned int | ip_addr, | |||
| unsigned int | port | |||
| ) |
Definition at line 342 of file permissions/hash.c.
References addr_list::grp, addr_list::ip_addr, _str::len, LM_ERR, addr_list::next, NULL, perm_hash, addr_list::port, _str::s, and shm_malloc().
Referenced by reload_address_table().
Definition at line 421 of file permissions/hash.c.
References addf_mi_node_child(), ip_addr::addr32, ip_addr::af, addr_list::grp, addr_list::ip_addr, ip_addr2a(), ip_addr::len, addr_list::next, PERM_HASH_SIZE, addr_list::port, and ip_addr::u.
Referenced by mi_address_dump().
| 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 | ) |
Definition at line 286 of file permissions/hash.c.
References trusted_list::next, trusted_list::pattern, PERM_HASH_SIZE, _str::s, shm_free, trusted_list::src_ip, and trusted_list::tag.
Referenced by free_hash_table(), and reload_trusted_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 | |||
| ) |
Definition at line 398 of file permissions/hash.c.
References addr_list::grp, addr_list::ip_addr, _str::len, addr_list::next, NULL, perm_hash, addr_list::port, and _str::s.
Referenced by allow_source_address_group().
| 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 | |||
| ) |
Definition at line 119 of file permissions/hash.c.
References _str::len, LM_CRIT, LM_ERR, trusted_list::next, NULL, trusted_list::pattern, perm_hash, trusted_list::proto, PROTO_NONE, PROTO_SCTP, PROTO_TCP, PROTO_TLS, PROTO_UDP, _str::s, shm_free, shm_malloc(), trusted_list::src_ip, and trusted_list::tag.
Referenced by reload_trusted_table().
| int hash_table_mi_print | ( | struct trusted_list ** | hash_table, | |
| struct mi_node * | rpl | |||
| ) |
Definition at line 258 of file permissions/hash.c.
References addf_mi_node_child(), _str::len, trusted_list::next, trusted_list::pattern, PERM_HASH_SIZE, trusted_list::proto, _str::s, trusted_list::src_ip, trusted_list::tag, and ZSW.
| void hash_table_print | ( | struct trusted_list ** | hash_table, | |
| FILE * | reply_file | |||
| ) |
| int init_tag_avp | ( | str * | tag_avp_param | ) |
Definition at line 47 of file permissions/hash.c.
References _str::len, LM_ERR, int_str::n, pv_get_avp_name(), pv_parse_spec(), _pv_spec::pvp, PVT_AVP, _str::s, tag_avp_type, and _pv_spec::type.
Referenced by mod_init().
| int match_addr_hash_table | ( | struct addr_list ** | table, | |
| unsigned int | grp, | |||
| unsigned int | ip_addr, | |||
| unsigned int | port | |||
| ) |
Definition at line 373 of file permissions/hash.c.
References addr_list::grp, addr_list::ip_addr, _str::len, addr_list::next, NULL, perm_hash, addr_list::port, and _str::s.
Referenced by allow_address(), and allow_source_address().
| int match_hash_table | ( | struct trusted_list ** | table, | |
| struct sip_msg * | msg, | |||
| char * | scr_ip, | |||
| int | proto | |||
| ) |
Definition at line 203 of file permissions/hash.c.
References add_avp(), AVP_VAL_STR, get_from, _str::len, LM_ERR, MAX_URI_SIZE, int_str::n, trusted_list::next, NULL, parse_from_header(), trusted_list::pattern, perm_hash, trusted_list::proto, PROTO_NONE, int_str::s, _str::s, trusted_list::src_ip, trusted_list::tag, and tag_avp_type.
Referenced by allow_trusted().
| 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] |
Definition at line 85 of file permissions/hash.c.
References LM_ERR, PERM_HASH_SIZE, and shm_malloc().
Referenced by init_trusted(), reload_address_table(), reload_domain_table(), and reload_trusted_table().
| 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 | |||
| ) |
Definition at line 490 of file permissions/hash.c.
References subnet::grp, LM_CRIT, subnet::mask, PERM_MAX_SUBNETS, subnet::port, and subnet::subnet.
Referenced by reload_address_table().
Definition at line 582 of file permissions/hash.c.
References addf_mi_node_child(), ip_addr::addr32, ip_addr::af, subnet::grp, ip_addr2a(), ip_addr::len, mask, PERM_MAX_SUBNETS, port, and ip_addr::u.
Referenced by mi_subnet_dump().
| void subnet_table_print | ( | struct subnet * | table, | |
| FILE * | reply_file | |||
| ) |
1.5.6