This file is indexed.

/usr/include/cherokee/plugin.h is in libcherokee-base0-dev 1.2.101-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */

/* Cherokee
 *
 * Authors:
 *      Alvaro Lopez Ortega <alvaro@alobbs.com>
 *
 * Copyright (C) 2001-2011 Alvaro Lopez Ortega
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General Public
 * License as published by the Free Software Foundation.
 *
 * 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.
 *
 * 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.
 */

#if !defined (CHEROKEE_INSIDE_CHEROKEE_H) && !defined (CHEROKEE_COMPILATION)
# error "Only <cherokee/cherokee.h> can be included directly, this file may disappear or change contents."
#endif

#ifndef CHEROKEE_PLUGIN_H
#define CHEROKEE_PLUGIN_H

#include <cherokee/http.h>


CHEROKEE_BEGIN_DECLS

/* Plug-in types
 */
typedef enum {
	cherokee_generic   = 1,
	cherokee_logger    = 1 << 1,
	cherokee_handler   = 1 << 2,
	cherokee_encoder   = 1 << 3,
	cherokee_validator = 1 << 4,
	cherokee_balancer  = 1 << 5,
	cherokee_rule      = 1 << 6,
	cherokee_vrule     = 1 << 7,
	cherokee_cryptor   = 1 << 8,
	cherokee_collector = 1 << 9
} cherokee_plugin_type_t;


/* Generic Plug-in info structure
 */
typedef struct {
	cherokee_plugin_type_t    type;
	void                     *instance;
	void                     *configure;
	const char               *name;
} cherokee_plugin_info_t;

#define PLUGIN_INFO(x) ((cherokee_plugin_info_t *)(x))


/* Specific Plug-ins structures
 */
typedef struct {
	cherokee_plugin_info_t    plugin;
	cherokee_http_method_t    valid_methods;
} cherokee_plugin_info_handler_t;

typedef struct {
	cherokee_plugin_info_t    plugin;
	cherokee_http_auth_t      valid_methods;
} cherokee_plugin_info_validator_t;

#define PLUGIN_INFO_HANDLER(x)     ((cherokee_plugin_info_handler_t *)(x))
#define PLUGIN_INFO_VALIDATOR(x)   ((cherokee_plugin_info_validator_t *)(x))

/* Commodity macros
 */
#define PLUGIN_INFO_NAME(name)       cherokee_ ## name ## _info
#define PLUGIN_INFO_PTR(name)        PLUGIN_INFO(&PLUGIN_INFO_NAME(name))
#define PLUGIN_INFO_HANDLER_PTR(x)   PLUGIN_INFO_HANDLER(&PLUGIN_INFO_NAME(x))
#define PLUGIN_INFO_VALIDATOR_PTR(x) PLUGIN_INFO_VALIDATOR(&PLUGIN_INFO_NAME(x))


/* Convenience macros
 */
#define PLUGIN_INFO_INIT(name, type, func, conf)                    \
 	cherokee_plugin_info_t                                      \
	        PLUGIN_INFO_NAME(name) =   	                    \
		{	type,	 		  	  	    \
			func,		 			    \
			conf,                                       \
			#name                                       \
		}

#define PLUGIN_INFO_HANDLER_INIT(name, type, func, conf, methods)   \
 	cherokee_plugin_info_handler_t                              \
	        PLUGIN_INFO_NAME(name) = {  	                    \
		{	type,	 		  	  	    \
			func,		 			    \
			conf,                                       \
			#name                                       \
		},			                            \
		(methods)				  	    \
 	}

#define PLUGIN_INFO_VALIDATOR_INIT(name, type, func, conf, methods) \
 	cherokee_plugin_info_validator_t                            \
	        PLUGIN_INFO_NAME(name) = {	                    \
		{	type,	 				    \
			func,		 			    \
			conf,                                       \
			#name                                       \
		},				 		    \
		(methods)				  	    \
 	}


/* Easy init macros
 */
#define PLUGIN_INFO_EASY_INIT(type,name)                            \
	PLUGIN_INFO_INIT(name, type,                                \
		(void *)type ## _ ## name ## _new,     \
		(void *)type ## _ ## name ## _configure)


/* Plugin initialization function
 */
#define PLUGIN_INIT_NAME(name)  cherokee_plugin_ ## name ## _init
#define PLUGIN_IS_INIT(name)    _## name ##_is_init

#define PLUGIN_INIT_PROTOTYPE(name)         			    \
	static cherokee_boolean_t PLUGIN_IS_INIT(name) = false;     \
        void                                                        \
	PLUGIN_INIT_NAME(name) (cherokee_plugin_loader_t *loader)

#define PLUGIN_INIT_ONCE_CHECK(name)         		            \
	if (PLUGIN_IS_INIT(name))				    \
		return;						    \
	PLUGIN_IS_INIT(name) = true

#define PLUGIN_EMPTY_INIT_FUNCTION(name)                            \
	void                                                        \
	PLUGIN_INIT_NAME(name) (cherokee_plugin_loader_t *loader)   \
	{                                                           \
		UNUSED(loader);					    \
	}                                                           \


CHEROKEE_END_DECLS

#endif /* CHEROKEE_PLUGIN_H */