Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 40 lines (28 sloc) 0.615 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
#ifndef ACL_H
#define ACL_H

#include <netinet/in.h>

struct evhttp_request;
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
acl_match_client(struct acl *a, struct evhttp_request *rq, in_addr_t *ip);

int
acl_allow_command(struct cmd *cmd, struct conf *cfg, struct evhttp_request *rq);

#endif
Something went wrong with that request. Please try again.