You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
614 B
C

14 years ago
#ifndef ACL_H
#define ACL_H
#include <netinet/in.h>
14 years ago
struct http_client;
14 years ago
struct cmd;
struct conf;
struct acl_commands {
unsigned int count;
char **commands;
};
struct acl {
/* CIDR subnet + mask */
struct {
int enabled;
in_addr_t subnet;
in_addr_t mask;
} cidr;
char *http_basic_auth;
/* commands that have been enabled or disabled */
struct acl_commands enabled;
struct acl_commands disabled;
struct acl *next;
};
int
14 years ago
acl_match_client(struct acl *a, struct http_client *client, in_addr_t *ip);
14 years ago
int
14 years ago
acl_allow_command(struct cmd *cmd, struct conf *cfg, struct http_client *client);
14 years ago
#endif