This file keeps track of the list of clients that are allowed to access the server. More...
Data Structures | |
struct | acl_list |
Access control storage structure. More... | |
struct | acl_addr |
An address span with access control information. More... | |
Enumerations | |
enum | acl_access { acl_deny = 0 , acl_refuse , acl_deny_non_local , acl_refuse_non_local , acl_allow , acl_allow_snoop , acl_allow_setrd , acl_allow_cookie } |
Enumeration of access control options for an address range. More... | |
Functions | |
struct acl_list * | acl_list_create (void) |
Create acl structure. More... | |
void | acl_list_delete (struct acl_list *acl) |
Delete acl structure. More... | |
struct acl_addr * | acl_interface_insert (struct acl_list *acl_interface, struct sockaddr_storage *addr, socklen_t addrlen, enum acl_access control) |
Insert interface in the acl_list. More... | |
int | acl_list_apply_cfg (struct acl_list *acl, struct config_file *cfg, struct views *v) |
Process access control config. More... | |
int | acl_interface_compare (const void *k1, const void *k2) |
compare ACL interface "addr_tree" nodes (+port) | |
void | acl_interface_init (struct acl_list *acl_interface) |
Initialise (also clean) the acl_interface struct. More... | |
int | acl_interface_apply_cfg (struct acl_list *acl_interface, struct config_file *cfg, struct views *v) |
Process interface control config. More... | |
enum acl_access | acl_get_control (struct acl_addr *acl) |
Lookup access control status for acl structure. More... | |
struct acl_addr * | acl_addr_lookup (struct acl_list *acl, struct sockaddr_storage *addr, socklen_t addrlen) |
Lookup address to see its acl structure. More... | |
size_t | acl_list_get_mem (struct acl_list *acl) |
Get memory used by acl structure. More... | |
const char * | acl_access_to_str (enum acl_access acl) |
void | log_acl_action (const char *action, struct sockaddr_storage *addr, socklen_t addrlen, enum acl_access acl, struct acl_addr *acladdr) |
This file keeps track of the list of clients that are allowed to access the server.
enum acl_access |
Enumeration of access control options for an address range.
Allow or deny access.
struct acl_list* acl_list_create | ( | void | ) |
Create acl structure.
References acl_list_delete(), acl_list::region, and regional_create().
void acl_list_delete | ( | struct acl_list * | acl | ) |
Delete acl structure.
acl | to delete. |
References acl_list::region, and regional_destroy().
Referenced by acl_list_create(), and daemon_delete().
struct acl_addr* acl_interface_insert | ( | struct acl_list * | acl_interface, |
struct sockaddr_storage * | addr, | ||
socklen_t | addrlen, | ||
enum acl_access | control | ||
) |
Insert interface in the acl_list.
This should happen when the listening interface is setup.
acl_interface | acl_list to insert to. |
addr | interface IP. |
addrlen | length of the interface IP. |
control | acl_access. |
References acl_find_or_create(), and acl_addr::control.
int acl_list_apply_cfg | ( | struct acl_list * | acl, |
struct config_file * | cfg, | ||
struct views * | v | ||
) |
Process access control config.
acl | where to store. |
cfg | config options. |
v | views structure |
References acl_list_str_cfg(), config_file::acl_tag_actions, config_file::acl_tag_datas, config_file::acl_tags, config_file::acl_view, config_file::acls, addr_tree_init(), addr_tree_init_parents(), config_file::do_ip6, read_acl_list(), read_acl_tag_actions(), read_acl_tag_datas(), read_acl_tags(), read_acl_view(), acl_list::region, regional_free_all(), and acl_list::tree.
void acl_interface_init | ( | struct acl_list * | acl_interface | ) |
Initialise (also clean) the acl_interface struct.
acl_interface | where to store. |
References addr_tree_addrport_init(), acl_list::region, regional_free_all(), and acl_list::tree.
Referenced by daemon_open_shared_ports().
int acl_interface_apply_cfg | ( | struct acl_list * | acl_interface, |
struct config_file * | cfg, | ||
struct views * | v | ||
) |
Process interface control config.
acl_interface | where to store. |
cfg | config options. |
v | views structure |
enum acl_access acl_get_control | ( | struct acl_addr * | acl | ) |
Lookup access control status for acl structure.
acl | structure for acl storage. |
struct acl_addr* acl_addr_lookup | ( | struct acl_list * | acl, |
struct sockaddr_storage * | addr, | ||
socklen_t | addrlen | ||
) |
Lookup address to see its acl structure.
acl | structure for address storage. |
addr | address to check |
addrlen | length of addr. |
References addr_tree_lookup(), and acl_list::tree.
size_t acl_list_get_mem | ( | struct acl_list * | acl | ) |
Get memory used by acl structure.
acl | structure for address storage. |
References acl_list::region, and regional_get_mem().