release 0.92.3
[cntlm.git] / acl.h
blobf44bc6bf11bf0ea9d2f43c603d24894a8357687c
1 /*
2 * These are ACL routines for the main module of CNTLM
4 * CNTLM is free software; you can redistribute it and/or modify it under the
5 * terms of the GNU General Public License as published by the Free Software
6 * Foundation; either version 2 of the License, or (at your option) any later
7 * version.
9 * CNTLM is distributed in the hope that it will be useful, but WITHOUT ANY
10 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12 * details.
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
16 * St, Fifth Floor, Boston, MA 02110-1301, USA.
18 * Copyright (c) 2007 David Kubicek
22 #ifndef _ACL_H
23 #define _ACL_H
25 #include <netinet/in.h>
27 #include "utils.h"
30 * ACL rule datatypes.
32 enum acl_t {
33 ACL_ALLOW = 0,
34 ACL_DENY
37 typedef struct {
38 unsigned int ip;
39 int mask;
40 } network_t;
42 extern int acl_add(plist_t *rules, char *spec, enum acl_t acl);
43 extern enum acl_t acl_check(plist_t rules, struct in_addr naddr);
45 #endif /* _ACL_H */