2008-05-24 16:05:49 +08:00
|
|
|
/* tinyproxy - A fast light-weight HTTP proxy
|
|
|
|
* Copyright (C) 2000 Robert James Kaes <rjkaes@users.sourceforge.net>
|
2000-09-12 08:08:48 +08:00
|
|
|
*
|
2008-05-24 16:05:49 +08:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
2000-09-12 08:08:48 +08:00
|
|
|
*
|
2008-05-24 16:05:49 +08:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2000-09-12 08:08:48 +08:00
|
|
|
*
|
2008-05-24 16:05:49 +08:00
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2000-09-12 08:08:48 +08:00
|
|
|
*/
|
|
|
|
|
2008-05-24 16:05:49 +08:00
|
|
|
/* See 'acl.c' for detailed information. */
|
|
|
|
|
2001-06-02 10:07:34 +08:00
|
|
|
#ifndef TINYPROXY_ACL_H
|
|
|
|
#define TINYPROXY_ACL_H
|
2000-09-12 08:08:48 +08:00
|
|
|
|
2020-09-08 05:09:35 +08:00
|
|
|
#include "sblist.h"
|
2018-12-31 23:47:40 +08:00
|
|
|
#include "sock.h"
|
2009-12-08 05:23:31 +08:00
|
|
|
|
2009-09-15 03:41:25 +08:00
|
|
|
typedef enum { ACL_ALLOW, ACL_DENY } acl_access_t;
|
2020-09-08 05:09:35 +08:00
|
|
|
typedef sblist* acl_list_t;
|
2000-09-12 08:08:48 +08:00
|
|
|
|
2009-12-07 06:30:23 +08:00
|
|
|
extern int insert_acl (char *location, acl_access_t access_type,
|
2020-09-08 04:53:14 +08:00
|
|
|
acl_list_t *access_list);
|
2018-12-31 23:47:40 +08:00
|
|
|
extern int check_acl (const char *ip_address, union sockaddr_union *addr,
|
2020-09-08 04:53:14 +08:00
|
|
|
acl_list_t access_list);
|
|
|
|
extern void flush_access_list (acl_list_t access_list);
|
2000-09-12 08:08:48 +08:00
|
|
|
|
|
|
|
#endif
|