1 /*
2    +----------------------------------------------------------------------+
3    | Zend OPcache                                                         |
4    +----------------------------------------------------------------------+
5    | Copyright (c) 1998-2016 The PHP Group                                |
6    +----------------------------------------------------------------------+
7    | This source file is subject to version 3.01 of the PHP license,      |
8    | that is bundled with this package in the file LICENSE, and is        |
9    | available through the world-wide-web at the following url:           |
10    | http://www.php.net/license/3_01.txt                                  |
11    | If you did not receive a copy of the PHP license and are unable to   |
12    | obtain it through the world-wide-web, please send a note to          |
13    | license@php.net so we can mail you a copy immediately.               |
14    +----------------------------------------------------------------------+
15    | Authors: Andi Gutmans <andi@zend.com>                                |
16    |          Zeev Suraski <zeev@zend.com>                                |
17    |          Stanislav Malyshev <stas@zend.com>                          |
18    |          Dmitry Stogov <dmitry@zend.com>                             |
19    +----------------------------------------------------------------------+
20 */
21 
22 #ifndef ZEND_ACCELERATOR_BLACKLIST_H
23 #define ZEND_ACCELERATOR_BLACKLIST_H
24 
25 typedef struct _zend_regexp_list zend_regexp_list;
26 
27 typedef struct _zend_blacklist_entry {
28     char *path;
29     int   path_length;
30 	int   id;
31 } zend_blacklist_entry;
32 
33 typedef struct _zend_blacklist {
34 	zend_blacklist_entry *entries;
35 	int                   size;
36 	int                   pos;
37 	zend_regexp_list     *regexp_list;
38 } zend_blacklist;
39 
40 extern zend_blacklist accel_blacklist;
41 
42 void zend_accel_blacklist_init(zend_blacklist *blacklist);
43 void zend_accel_blacklist_shutdown(zend_blacklist *blacklist);
44 
45 void zend_accel_blacklist_load(zend_blacklist *blacklist, char *filename);
46 zend_bool zend_accel_blacklist_is_blacklisted(zend_blacklist *blacklist, char *verify_path);
47 void zend_accel_blacklist_apply(zend_blacklist *blacklist, apply_func_arg_t func, void *argument TSRMLS_DC);
48 
49 #endif /* ZEND_ACCELERATOR_BLACKLIST_H */
50