2008-05-24 01:05:49 -07:00
|
|
|
/* tinyproxy - A fast light-weight HTTP proxy
|
|
|
|
* Copyright (C) 2000 Robert James Kaes <rjkaes@users.sourceforge.net>
|
2000-09-11 17:08:48 -07:00
|
|
|
*
|
2008-05-24 01:05:49 -07: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-11 17:08:48 -07:00
|
|
|
*
|
2008-05-24 01:05:49 -07: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-11 17:08:48 -07:00
|
|
|
*
|
2008-05-24 01:05:49 -07: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-11 17:08:48 -07:00
|
|
|
*/
|
|
|
|
|
2008-05-24 01:05:49 -07:00
|
|
|
/* See 'acl.c' for detailed information. */
|
|
|
|
|
2001-06-01 19:07:34 -07:00
|
|
|
#ifndef TINYPROXY_ACL_H
|
|
|
|
#define TINYPROXY_ACL_H
|
2000-09-11 17:08:48 -07:00
|
|
|
|
2020-09-07 14:09:35 -07:00
|
|
|
#include "sblist.h"
|
2018-12-31 07:47:40 -08:00
|
|
|
#include "sock.h"
|
2009-12-07 13:23:31 -08:00
|
|
|
|
2009-09-14 12:41:25 -07:00
|
|
|
typedef enum { ACL_ALLOW, ACL_DENY } acl_access_t;
|
2020-09-07 14:09:35 -07:00
|
|
|
typedef sblist* acl_list_t;
|
2000-09-11 17:08:48 -07:00
|
|
|
|
2009-12-06 14:30:23 -08:00
|
|
|
extern int insert_acl (char *location, acl_access_t access_type,
|
2020-09-07 13:53:14 -07:00
|
|
|
acl_list_t *access_list);
|
2018-12-31 07:47:40 -08:00
|
|
|
extern int check_acl (const char *ip_address, union sockaddr_union *addr,
|
2020-09-07 13:53:14 -07:00
|
|
|
acl_list_t access_list);
|
|
|
|
extern void flush_access_list (acl_list_t access_list);
|
2000-09-11 17:08:48 -07:00
|
|
|
|
|
|
|
#endif
|