Add security plugin file configuration
[MonkeyD.git] / src / include / deny.h
blob6a0e72772380d7e21c94a378b5a5aafca1657c8f
1 /* Monkey HTTP Daemon
2 * ------------------
3 * Copyright (C) 2001-2003, Eduardo Silva P.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Library General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 /* deny.c */
22 /* Estructura para denegacion de IP & URL */
23 #define MAX_DENY_VALUE 255
25 #define DENY_CONF_FILENAME "monkey.deny"
26 #define DENY_IP 0
27 #define DENY_URL 1
28 #define DENY_CONF_IP "IP"
29 #define DENY_CONF_URL "URL"
31 struct deny{
32 short int type;
33 char value[MAX_DENY_VALUE];
34 struct deny *next;
35 } *first_deny;
37 void Deny_Read_Config();
38 void Deny_Add(const short int type, char *value);
39 int Deny_Check(struct request *req, char *client_ip);
40 int Check_IP(char *client_ip, char *aux_deny_value);