Paraslash Audio Streaming | |
About News Download Documentation Development |
Access control lists for paraslash senders. More...
#include <netinet/in.h>
#include <sys/socket.h>
#include <regex.h>
#include <arpa/inet.h>
#include <sys/un.h>
#include <netdb.h>
#include "para.h"
#include "error.h"
#include "string.h"
#include "list.h"
#include "net.h"
#include "acl.h"
Functions | |
void | acl_add_entry (struct list_head *acl, char *addr, int netmask) |
Add an entry to an access control list. More... | |
char * | acl_get_contents (struct list_head *acl) |
Compute a string containing the contents of an acl. More... | |
int | acl_check_access (int fd, struct list_head *acl, int default_deny) |
Check whether the peer name of a given fd is allowed by an acl. More... | |
void | acl_allow (char *addr, int netmask, struct list_head *acl, int default_deny) |
Permit access for a range of IP addresses. More... | |
void | acl_deny (char *addr, int netmask, struct list_head *acl, int default_deny) |
Deny access for a range of IP addresses. More... | |
Access control lists for paraslash senders.
void acl_add_entry | ( | struct list_head * | acl, |
char * | addr, | ||
int | netmask | ||
) |
Add an entry to an access control list.
acl | The access control list. |
addr | The address to add. |
netmask | The netmask to use for this entry. |
References alloc(), and PARA_INFO_LOG.
Referenced by acl_allow().
char* acl_get_contents | ( | struct list_head * | acl | ) |
Compute a string containing the contents of an acl.
acl | The access control list. |
NULL
if acl is empty. References list_for_each_entry_safe, and make_message().
Referenced by generic_sender_status().
int acl_check_access | ( | int | fd, |
struct list_head * | acl, | ||
int | default_deny | ||
) |
Check whether the peer name of a given fd is allowed by an acl.
fd | File descriptor. |
acl | The access control list. |
default_deny | Whether acl is a whitelist. |
-E_ACL_PERM
otherwise. Referenced by accept_sender_client().
void acl_allow | ( | char * | addr, |
int | netmask, | ||
struct list_head * | acl, | ||
int | default_deny | ||
) |
Permit access for a range of IP addresses.
addr | The address to permit. |
netmask | The netmask of the entry to be permitted. |
acl | The access control list. |
default_deny | Whether acl is a whitelist. |
References acl_add_entry().
Referenced by acl_deny(), generic_acl_deplete(), and generic_com_allow().
void acl_deny | ( | char * | addr, |
int | netmask, | ||
struct list_head * | acl, | ||
int | default_deny | ||
) |
Deny access for a range of IP addresses.
addr | The address to deny. |
netmask | The netmask of the entry to be denied. |
acl | The access control list. |
default_deny | Whether acl is a whitelist. |
References acl_allow().
Referenced by generic_com_deny().