This file is indexed.

/usr/include/c_icap/c-icap.h is in libicapapi-dev 1:0.4.4-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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
/*
 *  Copyright (C) 2004-2008 Christos Tsantilas
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  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
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *  MA  02110-1301  USA.
 */


#ifndef __C_ICAP_H
#define   __C_ICAP_H


#if defined (_MSC_VER)
#include "c-icap-conf-w32.h"
#else
#include "c-icap-conf.h"
#endif

#ifdef __SYS_TYPES_H_EXISTS
#include <sys/types.h>
#endif

#ifdef __INTTYPES_H_EXISTS
#include <inttypes.h>
#endif

/*some defines */
#ifdef _WIN32
# define CI_FILENAME_LEN _MAX_PATH
# define CI_MAX_PATH     _MAX_PATH
#else
# if defined(MAXPATHLEN)
#   define CI_MAX_PATH     MAXPATHLEN
# elif defined(PATH_MAX)
#   define CI_MAX_PATH     PATH_MAX
# else
#   define CI_MAX_PATH     4096 
# endif
# define CI_FILENAME_LEN CI_MAX_PATH
#endif


#ifdef _WIN32
# if defined(CI_BUILD_LIB) 

#   define CI_DECLARE_FUNC(type) __declspec(dllexport) type
#   define CI_DECLARE_DATA       __declspec(dllexport)

# else

#   define CI_DECLARE_FUNC(type) __declspec(dllimport) type
#   define CI_DECLARE_DATA       __declspec(dllimport)

# endif

# if defined (CI_BUILD_MODULE)
#   define CI_DECLARE_MOD_DATA   __declspec(dllexport)
#   define CI_DECLARE_MOD_FUNC(type)   __declspec(dllexport) type
# endif

#else

/*
  
*/
#if defined (USE_VISIBILITY_ATTRIBUTE)
#define CI_DECLARE_FUNC(type) __attribute__ ((visibility ("default"))) type
#define CI_DECLARE_DATA __attribute__ ((visibility ("default")))
#define CI_DECLARE_MOD_DATA __attribute__ ((visibility ("default")))
#else
#define CI_DECLARE_FUNC(type) type
#define CI_DECLARE_DATA
#define CI_DECLARE_MOD_DATA
#endif
#endif

/*
  Here we are define the ci_off_t type to support large files
  We must be careful here, the off_t type is unsigned integer.

  -A comment about lfs:
  In Solaris and Linux to have lfs support, if you are using 
  only lseek and open function, you are using off_t type for offsets
  and compile the program with -D_FILE_OFFSET_BITS=64. This flag
  forces the compiler to typedefs the off_t type as an 64bit integer,
  uses open64, lseek64, mkstemp64 and fopen64 functions. 
  
  Instead for fseek and ftell the functions fseeko and ftello must be used.
  This functions uses off_t argument's instead of long.
  Currently we are not using fseek and ftell in c-icap. 

  The open's manual page says that the flag O_LARGEFILE must be used. Looks that 
  it does not actually needed for linux and solaris (version 10) (but must be checked again......)

  The off_t type in my linux system is a signed integer, but I am not
  sure if it is true for all operating systems
  
*/
typedef off_t ci_off_t;
#if CI_SIZEOF_OFF_T > 4 
#   define PRINTF_OFF_T "lld" 
#   define CAST_OFF_T long long int
#   define ci_strto_off_t strtoll
#   define CI_STRTO_OFF_T_MAX LLONG_MAX
#   define CI_STRTO_OFF_T_MIN LLONG_MIN
#else
#   define PRINTF_OFF_T "ld" 
#   define CAST_OFF_T  long int
#   define ci_strto_off_t strtol
#   define CI_STRTO_OFF_T_MAX LONG_MAX
#   define CI_STRTO_OFF_T_MIN LONG_MIN
#endif

/*
  Detect n-bytes alignment.
  Old 8 bytes alignment macro:
  #define _CI_ALIGN(val) ((val+7)&~7)
*/
struct _ci_align_test {char n[1]; double d;};
#define _CI_NBYTES_ALIGNMENT ((size_t) &(((struct _ci_align_test *)0)[0].d))
#define _CI_ALIGN(val) ((val+(_CI_NBYTES_ALIGNMENT - 1))&~(_CI_NBYTES_ALIGNMENT - 1))

#define ICAP_OPTIONS   0x01
#define ICAP_REQMOD    0x02
#define ICAP_RESPMOD   0x04

CI_DECLARE_DATA extern const char *ci_methods[];

#define ci_method_support(METHOD, METHOD_DEF) (METHOD&METHOD_DEF)
#define ci_method_string(method) (method<=ICAP_RESPMOD && method>=ICAP_OPTIONS ?ci_methods[method]:"UNKNOWN")


enum ci_error_codes { EC_100, EC_200, EC_204, EC_206, EC_400, 
                   EC_401, EC_403,
		   EC_404, EC_405, EC_407, EC_408,
		   EC_500, EC_501, EC_502, 
		   EC_503, EC_505,
                   EC_MAX
};

typedef struct ci_error_code{
  int code;
  char *str;
} ci_error_code_t;

CI_DECLARE_DATA extern const struct ci_error_code ci_error_codes[];
#define ci_error_code(ec) (ec>=EC_100&&ec<EC_MAX?ci_error_codes[ec].code:1000)
#define ci_error_code_string(ec) (ec>=EC_100&&ec<EC_MAX?ci_error_codes[ec].str:"UNKNOWN ERROR CODE")


#define ICAP_EOL "\r\n"
#define ICAP_EOF "0\r\n\r\n"
#define ICAP_IEOF "0; ieof\r\n\r\n"
#define ISTAG     "CI0001" /*Always length of 6 chars*/
#define ISTAG_SIZE 32

/*The following block defines the base doxygen group (API group)*/
/**
 \defgroup API  API  Documentation
 * Functions, typedefs and structures for use with modules and services
 *
 */

#endif