OpenDNSSEC-signer  2.1.3
Data Structures | Typedefs | Enumerations | Functions
acl.h File Reference
#include "config.h"
#include "status.h"
#include "wire/listener.h"
#include "wire/tsig.h"

Go to the source code of this file.

Data Structures

struct  acl_struct
 

Typedefs

typedef enum acl_range_enum acl_range_type
 
typedef struct acl_struct acl_type
 

Enumerations

enum  acl_range_enum { ACL_RANGE_SINGLE = 0, ACL_RANGE_MASK = 1, ACL_RANGE_SUBNET = 2, ACL_RANGE_MINMAX = 3 }
 

Functions

acl_typeacl_create (char *address, char *port, char *tsig_name, tsig_type *tsig)
 
acl_typeacl_find (acl_type *acl, struct sockaddr_storage *addr, tsig_rr_type *tsig)
 
int acl_parse_family (const char *a)
 
int addr2ip (struct sockaddr_storage addr, char *ip, size_t len)
 
void acl_cleanup (acl_type *acl)
 

Typedef Documentation

◆ acl_range_type

Definition at line 51 of file acl.h.

◆ acl_type

typedef struct acl_struct acl_type

ACL.

Definition at line 57 of file acl.h.

Enumeration Type Documentation

◆ acl_range_enum

Access Control List. Address range type.

Enumerator
ACL_RANGE_SINGLE 
ACL_RANGE_MASK 
ACL_RANGE_SUBNET 
ACL_RANGE_MINMAX 

Definition at line 45 of file acl.h.

Function Documentation

◆ acl_cleanup()

void acl_cleanup ( acl_type acl)

Clean up ACL.

Parameters
[in]aclACL
[in]allocatormemory allocator

Clean up ACL.

Definition at line 456 of file acl.c.

References acl_cleanup(), acl_struct::address, and acl_struct::next.

Referenced by acl_cleanup(), dnsin_cleanup(), and dnsout_cleanup().

◆ acl_create()

acl_type* acl_create ( char *  address,
char *  port,
char *  tsig_name,
tsig_type tsig 
)

Create ACL.

Parameters
[in]allocatormemory allocator
[in]addressIP address
[in]portport
[in]tsig_nameTSIG name
[in]tsiglist of TSIGs
Returns
acl_type* ACL

Create ACL.

Definition at line 126 of file acl.c.

References acl_struct::address, acl_struct::next, acl_struct::tsig, and tsig_lookup_by_name().

◆ acl_find()

acl_type* acl_find ( acl_type acl,
struct sockaddr_storage *  addr,
tsig_rr_type trr 
)

Find ACL.

Parameters
[in]aclACL
[in]addrremote address storage
[in]tsigtsig credentials
Returns
acl_type* ACL that matches

Find ACL.

Definition at line 437 of file acl.c.

◆ acl_parse_family()

int acl_parse_family ( const char *  a)

Parse family from address.

Parameters
[in]aaddress in string format
Returns
int address family

Parse family from address.

Definition at line 104 of file acl.c.

◆ addr2ip()

int addr2ip ( struct sockaddr_storage  addr,
char *  ip,
size_t  len 
)

Address storage to IP string.

Parameters
[in]addrsocket address storage
[out]ipip address
[in]lenmax strlen of ip address
Returns
int 0 if failed, 1 otherwise

Address storage to IP string.

Definition at line 416 of file acl.c.