3 #include "btree_cache.h"
20 #ifdef HAVE_SYS_TIME_H
26 #ifdef HAVE_SYS_RESOURCE_H
27 #include <sys/resource.h>
32 #if defined(HAVE_SYS_DIRENT_H) && !defined(HAVE_DIRENT_H)
33 #include <sys/dirent.h>
38 #ifdef HAVE_SYS_SOCKET_H
39 #include <sys/socket.h>
47 #ifdef HAVE_NETINET_IN_H
48 #include <netinet/in.h>
50 #ifdef HAVE_ARPA_INET_H
51 #include <arpa/inet.h>
53 #ifdef HAVE_SYS_STAT_H
62 #ifdef HAVE_SYS_WAIT_H
80 #ifdef HAVE_GDFONTMB_H
89 #ifdef HAVE_INTTYPES_H
104 #ifdef HAVE_EXECINFO_H
105 #include <execinfo.h>
108 #if defined(HAVE_FOPEN64)
109 #define _FILE_OFFSET_BITS 64
110 #define MY_FOPEN fopen64
112 #define MY_FOPEN fopen
115 #if !defined(HAVE_BZERO)
116 #define bzero(mem,size) memset(mem,0,size)
119 #if defined(IBERTY_LIB) && !defined(HAVE_MKSTEMP)
120 int mkstemps(char *template, int suffixlen
);
121 #define mkstemp(template) mkstemps(template,0)
126 #define _(String) gettext(String)
128 #define N_(String) gettext_noop(String)
130 #define N_(String) (String)
133 #define _(String) (String)
134 #define N_(String) (String)
135 #define textdomain(String)
136 #define bindtextdomain(Domain,Directory)
139 #if defined(__MINGW32__)
140 #define mkdir(p,m) _mkdir(p)
143 #define WIFEXITED(S) 1
147 #define WEXITSTATUS(S) (S)
150 #endif /*__MINGW32__*/
155 #define REPORT_TYPE_USERS_SITES 0x0001UL
156 #define REPORT_TYPE_SITE_USER_TIME_DATE 0x0002UL
157 #define REPORT_TYPE_TOPUSERS 0x0004UL
158 #define REPORT_TYPE_TOPSITES 0x0008UL
159 #define REPORT_TYPE_SITES_USERS 0x0010UL
160 #define REPORT_TYPE_DATE_TIME 0x0020UL
161 #define REPORT_TYPE_DENIED 0x0040UL
162 #define REPORT_TYPE_AUTH_FAILURES 0x0080UL
163 #define REPORT_TYPE_DOWNLOADS 0x0100UL
165 #define DATA_FIELD_USER 0x0001UL
166 #define DATA_FIELD_DATE 0x0002UL
167 #define DATA_FIELD_TIME 0x0004UL
168 #define DATA_FIELD_URL 0x0008UL
169 #define DATA_FIELD_CONNECT 0x0010UL
170 #define DATA_FIELD_BYTES 0x0020UL
171 #define DATA_FIELD_IN_CACHE 0x0040UL
172 #define DATA_FIELD_OUT_CACHE 0x0080UL
173 #define DATA_FIELD_ELAPSED 0x0100UL
175 #define TOPUSERFIELDS_NUM 0x0001UL
176 #define TOPUSERFIELDS_DATE_TIME 0x0002UL
177 #define TOPUSERFIELDS_USERID 0x0004UL
178 #define TOPUSERFIELDS_CONNECT 0x0008UL
179 #define TOPUSERFIELDS_BYTES 0x0010UL
180 #define TOPUSERFIELDS_SETYB 0x0020UL
181 #define TOPUSERFIELDS_IN_CACHE_OUT 0x0040UL
182 #define TOPUSERFIELDS_USED_TIME 0x0080UL
183 #define TOPUSERFIELDS_MILISEC 0x0100UL
184 #define TOPUSERFIELDS_PTIME 0x0200UL
185 #define TOPUSERFIELDS_TOTAL 0x0400UL
186 #define TOPUSERFIELDS_AVERAGE 0x0800UL
188 #define USERREPORTFIELDS_CONNECT 0x0001UL
189 #define USERREPORTFIELDS_BYTES 0x0002UL
190 #define USERREPORTFIELDS_SETYB 0x0004UL
191 #define USERREPORTFIELDS_IN_CACHE_OUT 0x0008UL
192 #define USERREPORTFIELDS_USED_TIME 0x0010UL
193 #define USERREPORTFIELDS_MILISEC 0x0020UL
194 #define USERREPORTFIELDS_PTIME 0x0040UL
195 #define USERREPORTFIELDS_TOTAL 0x0080UL
196 #define USERREPORTFIELDS_AVERAGE 0x0100UL
198 #define INDEX_YES 0x0001UL
199 #define INDEX_NO 0x0002UL
200 #define INDEX_ONLY 0x0004UL
202 #define INDEX_TREE_DATE 0x0001UL
203 #define INDEX_TREE_FILE 0x0002UL
208 char dirname
[MAXLEN
];
222 char parse_out
[MAXLEN
];
225 char datestimes
[MAXLEN
];
226 char ConfigFile
[MAXLEN
];
231 char day
[3], month
[4], year
[5];
237 char ReplaceIndex
[256];
238 unsigned long int Index
;
241 char RecordsWithoutUser
[20];
243 char MailUtility
[PATH_MAX
];
246 char ExcludeCodes
[256];
247 char TopsitesSortField
[15];
248 char TopsitesSortType
[20];
249 unsigned long int ReportType
;
250 char UserTabFile
[255];
258 char AccessLog
[MAXLOGS
][MAXLEN
];
259 int AccessLogFromCmdLine
;
261 char BgColor
[MAXLEN
];
262 char BgImage
[MAXLEN
];
263 char TxColor
[MAXLEN
];
264 char TxBgColor
[MAXLEN
];
265 char TiColor
[MAXLEN
];
266 char LogoImage
[MAXLEN
];
267 char LogoText
[MAXLEN
];
268 char LogoTextColor
[MAXLEN
];
271 char FontFace
[MAXLEN
];
272 char HeaderColor
[MAXLEN
];
273 char HeaderBgColor
[MAXLEN
];
274 char FontSize
[MAXLEN
];
275 char PasswdFile
[MAXLEN
];
276 char TempDir
[MAXLEN
];
277 char OutputDir
[MAXLEN
];
278 char OutputEmail
[MAXLEN
];
279 char TopuserSortField
[30];
280 char UserSortField
[30];
281 char TopuserSortOrder
[10];
282 char UserSortOrder
[10];
283 char UserAgentLog
[255];
285 char ExcludeHosts
[255];
286 char ExcludeUsers
[255];
288 char PerUserLimitFile
[255];
291 char MaxElapsed
[255];
295 char UserInvalidChar
[255];
297 char GraphDaysBytesBarColor
[255];
299 char PrivacyString
[255];
300 char PrivacyStringColor
[30];
301 char IncludeUsers
[MAXLEN
];
302 char ExcludeString
[MAXLEN
];
304 unsigned long int TopUserFields
;
305 unsigned long int UserReportFields
;
306 char DataFile
[MAXLEN
];
307 char DataFileDelimiter
[3];
308 unsigned long int DataFileFields
;
309 char DataFileUrl
[20];
310 char SiteUserTimeDateType
[10];
311 int ShowReadStatistics
;
312 char IndexSortOrder
[5];
313 char DansGuardianConf
[MAXLEN
];
314 int DansguardianIgnoreDate
;
315 char SquidGuardConf
[MAXLEN
];
316 char SquidGuarddbHome
[255];
317 char SquidGuardLogFormat
[MAXLEN
];
318 char SquidGuardLogAlternate
[MAXLEN
];
319 int SquidguardIgnoreDate
;
321 int BytesInSitesUsersReport
;
323 char ParsedOutputLog
[MAXLEN
];
324 char ParsedOutputLogCompress
[512];
325 char DisplayedValues
[20];
326 char HeaderFontSize
[5];
327 char TitleFontSize
[5];
328 char wwwDocumentRoot
[MAXLEN
];
329 char ExternalCSSFile
[MAXLEN
];
331 char BlockImage
[512];
332 char NtlmUserFormat
[30];
333 unsigned long int IndexTree
;
334 int UserAuthentication
;
335 char AuthUserFile
[255];
357 char html_old
[MAXLEN
];
367 char RealtimeTypes
[1024];
372 char RealtimeUnauthRec
[15];
374 char LDAPBindDN
[512];
375 char LDAPBindPW
[255];
377 int LDAPProtocolVersion
;
378 char LDAPBaseSearch
[255];
379 char LDAPFilterSearch
[512];
380 char LDAPTargetAttr
[64];
387 int dansguardian_count
;
388 int squidguard_count
;
409 int AuthfailReportLimit
;
410 int DeniedReportLimit
;
411 int DownloadReportLimit
;
412 int SiteUsersReportLimit
;
413 int DansGuardianReportLimit
;
414 int SquidGuardReportLimit
;
417 int realtime_refresh
;
418 int realtime_access_log_lines
;
429 long long int nocost
;
438 struct dirent
*direntp
;