acl_list.h File Reference

This file keeps track of the list of clients that are allowed to access the server. More...

#include "util/storage/dnstree.h"

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_allow, acl_allow_snoop }
 Enumeration of access control options for an address range. More...

Functions

struct acl_listacl_list_create ()
 Create acl structure.
void acl_list_delete (struct acl_list *acl)
 Delete acl structure.
int acl_list_apply_cfg (struct acl_list *acl, struct config_file *cfg)
 Process access control config.
enum acl_access acl_list_lookup (struct acl_list *acl, struct sockaddr_storage *addr, socklen_t addrlen)
 Lookup address to see its access control status.
size_t acl_list_get_mem (struct acl_list *acl)
 Get memory used by acl structure.


Detailed Description

This file keeps track of the list of clients that are allowed to access the server.


Enumeration Type Documentation

enum acl_access

Enumeration of access control options for an address range.

Allow or deny access.

Enumerator:
acl_deny  disallow any access whatsoever, drop it
acl_refuse  disallow access, send a polite 'REFUSED' reply
acl_allow  allow full access for recursion (+RD) queries
acl_allow_snoop  allow full access for all queries, recursion and cache snooping


Function Documentation

struct acl_list* acl_list_create (  )  [read]

Create acl structure.

Returns:
new structure or NULL on error.

References acl_list_delete(), acl_list::region, and regional_create().

Referenced by daemon_init().

void acl_list_delete ( struct acl_list acl  ) 

Delete acl structure.

Parameters:
acl,: to delete.

References acl_list::region, and regional_destroy().

Referenced by acl_list_create(), and daemon_delete().

int acl_list_apply_cfg ( struct acl_list acl,
struct config_file cfg 
)

Process access control config.

Parameters:
acl,: where to store.
cfg,: config options.
Returns:
0 on error.

References acl_list_str_cfg(), addr_tree_init(), addr_tree_init_parents(), config_file::do_ip6, read_acl_list(), acl_list::region, regional_free_all(), and acl_list::tree.

Referenced by daemon_fork().

enum acl_access acl_list_lookup ( struct acl_list acl,
struct sockaddr_storage *  addr,
socklen_t  addrlen 
)

Lookup address to see its access control status.

Parameters:
acl,: structure for address storage.
addr,: address to check
addrlen,: length of addr.
Returns:
: what to do with message from this address.

References acl_deny, addr_tree_lookup(), acl_addr::control, and acl_list::tree.

Referenced by worker_handle_request().

size_t acl_list_get_mem ( struct acl_list acl  ) 

Get memory used by acl structure.

Parameters:
acl,: structure for address storage.
Returns:
bytes in use.

References acl_list::region, and regional_get_mem().


Generated on Mon Nov 16 11:49:44 2009 for unbound by  doxygen 1.5.9