]>
Commit | Line | Data |
---|---|---|
b3695c67 | 1 | #include "config.h" |
25697a35 | 2 | #include "info.h" |
e3af0ae9 | 3 | #include "btree_cache.h" |
25697a35 | 4 | |
b3695c67 FM |
5 | #ifdef HAVE_WINDOWS_H |
6 | #include <windows.h> | |
7 | #endif | |
8 | #ifdef HAVE_STDIO_H | |
25697a35 GS |
9 | #include <stdio.h> |
10 | #endif | |
b3695c67 | 11 | #ifdef HAVE_STDLIB_H |
25697a35 GS |
12 | #include <stdlib.h> |
13 | #endif | |
b3695c67 | 14 | #ifdef HAVE_STRING_H |
25697a35 GS |
15 | #include <string.h> |
16 | #endif | |
b3695c67 | 17 | #ifdef HAVE_STRINGS_H |
25697a35 GS |
18 | #include <strings.h> |
19 | #endif | |
b3695c67 | 20 | #ifdef HAVE_SYS_TIME_H |
25697a35 GS |
21 | #include <sys/time.h> |
22 | #endif | |
b3695c67 | 23 | #ifdef HAVE_TIME_H |
25697a35 GS |
24 | #include <time.h> |
25 | #endif | |
b3695c67 | 26 | #ifdef HAVE_SYS_RESOURCE_H |
25697a35 GS |
27 | #include <sys/resource.h> |
28 | #endif | |
b3695c67 | 29 | #ifdef HAVE_UNISTD_H |
25697a35 GS |
30 | #include <unistd.h> |
31 | #endif | |
b3695c67 | 32 | #if defined(HAVE_SYS_DIRENT_H) && !defined(HAVE_DIRENT_H) |
25697a35 GS |
33 | #include <sys/dirent.h> |
34 | #endif | |
b3695c67 | 35 | #ifdef HAVE_DIRENT_H |
25697a35 GS |
36 | #include <dirent.h> |
37 | #endif | |
b3695c67 | 38 | #ifdef HAVE_SYS_SOCKET_H |
25697a35 GS |
39 | #include <sys/socket.h> |
40 | #endif | |
b3695c67 | 41 | #ifdef HAVE_NETDB_H |
25697a35 GS |
42 | #include <netdb.h> |
43 | #endif | |
b3695c67 | 44 | #ifdef HAVE_TYPES_H |
25697a35 GS |
45 | #include <types.h> |
46 | #endif | |
b3695c67 | 47 | #ifdef HAVE_NETINET_IN_H |
25697a35 GS |
48 | #include <netinet/in.h> |
49 | #endif | |
b3695c67 | 50 | #ifdef HAVE_ARPA_INET_H |
25697a35 GS |
51 | #include <arpa/inet.h> |
52 | #endif | |
b3695c67 | 53 | #ifdef HAVE_SYS_STAT_H |
25697a35 GS |
54 | #include <sys/stat.h> |
55 | #endif | |
b3695c67 | 56 | #ifdef HAVE_CTYPE_H |
25697a35 GS |
57 | #include <ctype.h> |
58 | #endif | |
b3695c67 | 59 | #ifdef HAVE_ERRNO_H |
25697a35 GS |
60 | #include <errno.h> |
61 | #endif | |
b3695c67 | 62 | #ifdef HAVE_SYS_WAIT_H |
d96e3ba6 FM |
63 | #include <sys/wait.h> |
64 | #endif | |
b3695c67 | 65 | #ifdef HAVE_GD_H |
2824ec9b | 66 | #define HAVE_GD 1 |
25697a35 | 67 | #include <gd.h> |
25697a35 | 68 | #endif |
b3695c67 | 69 | #ifdef HAVE_GDFONTL_H |
25697a35 GS |
70 | #include <gdfontl.h> |
71 | #endif | |
b3695c67 | 72 | #ifdef HAVE_GDFONTT_H |
25697a35 GS |
73 | #include <gdfontt.h> |
74 | #endif | |
b3695c67 | 75 | #ifdef HAVE_GDFONTS_H |
25697a35 GS |
76 | #include <gdfonts.h> |
77 | #endif | |
b3695c67 | 78 | #ifdef HAVE_GDFONTMB_H |
25697a35 GS |
79 | #include <gdfontmb.h> |
80 | #endif | |
b3695c67 | 81 | #ifdef HAVE_GDFONTG_H |
25697a35 GS |
82 | #include <gdfontg.h> |
83 | #endif | |
b3695c67 | 84 | #ifdef HAVE_STDARG_H |
d2fe0c32 FM |
85 | #include <stdarg.h> |
86 | #endif | |
b3695c67 | 87 | #ifdef HAVE_INTTYPES_H |
2357ef77 FM |
88 | #include <inttypes.h> |
89 | #endif | |
b3695c67 | 90 | #ifdef HAVE_LIMITS_H |
4af2f8ff FM |
91 | #include <limits.h> |
92 | #endif | |
b3695c67 FM |
93 | #ifdef HAVE_WINSOCK_H |
94 | #include <winsock.h> | |
95 | #endif | |
e3af0ae9 PO |
96 | #ifdef HAVE_MATH_H |
97 | #include <math.h> | |
98 | #endif | |
a1de61fe FM |
99 | #ifdef HAVE_LOCALE_H |
100 | #include <locale.h> | |
101 | #endif | |
e6414a9d FM |
102 | #ifdef HAVE_EXECINFO_H |
103 | #include <execinfo.h> | |
104 | #endif | |
d5d021c5 FM |
105 | #ifdef HAVE_LIBGEN_H |
106 | #include <libgen.h> | |
107 | #endif | |
06b39c87 FM |
108 | #ifdef HAVE_STDBOOL_H |
109 | #include <stdbool.h> | |
110 | #else | |
111 | typedef int bool; | |
112 | #define true 1 | |
113 | #define false 0 | |
114 | #endif | |
72a23a7a FM |
115 | #ifdef HAVE_FCNTL_H |
116 | #include <fcntl.h> | |
117 | #endif | |
6068ae56 FM |
118 | #ifdef HAVE_FNMATCH_H |
119 | #include <fnmatch.h> | |
120 | #endif | |
25697a35 | 121 | |
b3695c67 | 122 | #if defined(HAVE_FOPEN64) |
25697a35 | 123 | #define _FILE_OFFSET_BITS 64 |
936c9905 | 124 | #define MY_FOPEN fopen64 |
25697a35 GS |
125 | #else |
126 | #define MY_FOPEN fopen | |
127 | #endif | |
128 | ||
b3695c67 FM |
129 | #if !defined(HAVE_BZERO) |
130 | #define bzero(mem,size) memset(mem,0,size) | |
131 | #endif | |
132 | ||
133 | #if defined(IBERTY_LIB) && !defined(HAVE_MKSTEMP) | |
134 | int mkstemps(char *template, int suffixlen); | |
135 | #define mkstemp(template) mkstemps(template,0) | |
136 | #endif | |
137 | ||
eb7ab620 | 138 | #include "gettext.h" |
eca2cec9 | 139 | #if defined(ENABLE_NLS) && defined(HAVE_LIBINTL_H) |
c0ec9cc7 FM |
140 | #define _(String) gettext(String) |
141 | #ifdef gettext_noop | |
142 | #define N_(String) gettext_noop(String) | |
143 | #else | |
144 | #define N_(String) (String) | |
145 | #endif | |
146 | #else /* No NLS */ | |
147 | #define _(String) (String) | |
148 | #define N_(String) (String) | |
eca2cec9 | 149 | #endif //NLS |
c0ec9cc7 | 150 | |
b3695c67 FM |
151 | #if defined(__MINGW32__) |
152 | #define mkdir(p,m) _mkdir(p) | |
153 | ||
154 | #ifndef WIFEXITED | |
155 | #define WIFEXITED(S) 1 | |
156 | #endif | |
157 | ||
158 | #ifndef WEXITSTATUS | |
159 | #define WEXITSTATUS(S) (S) | |
160 | #endif | |
161 | ||
162 | #endif /*__MINGW32__*/ | |
25697a35 | 163 | |
f0126186 FM |
164 | #ifndef __GNUC__ |
165 | # define __attribute__(x) | |
166 | #endif | |
167 | ||
25697a35 | 168 | #define MAXLEN 20000 |
ac422f9b | 169 | #define MAX_URL_LEN 40000 |
f72b484a | 170 | #define MAX_TRUNCATED_URL 250 |
f2ec8c75 FM |
171 | #define MAX_USER_LEN 256 |
172 | #define MAX_USER_FNAME_LEN 128 | |
2240dcea FM |
173 | #define MAX_IP_LEN 64 |
174 | #define MAX_DATETIME_LEN 32 | |
1f482a8d FM |
175 | #define MAX_REDIRECTOR_LOGS 64 |
176 | #define MAX_REDIRECTOR_FILELEN 1024 | |
21fd55af FM |
177 | /*! |
178 | Arbitrary limit on the number of days that are accepted in the selected range of the log file. | |
179 | Sarg will complain that there are too many days in the files if this limit is overrun. | |
180 | */ | |
181 | #define MAX_DATETIME_DAYS 1000 | |
25697a35 | 182 | |
085c1e1f FM |
183 | #define REPORT_TYPE_USERS_SITES 0x0001UL |
184 | #define REPORT_TYPE_SITE_USER_TIME_DATE 0x0002UL | |
185 | #define REPORT_TYPE_TOPUSERS 0x0004UL | |
186 | #define REPORT_TYPE_TOPSITES 0x0008UL | |
187 | #define REPORT_TYPE_SITES_USERS 0x0010UL | |
188 | #define REPORT_TYPE_DATE_TIME 0x0020UL | |
189 | #define REPORT_TYPE_DENIED 0x0040UL | |
190 | #define REPORT_TYPE_AUTH_FAILURES 0x0080UL | |
191 | #define REPORT_TYPE_DOWNLOADS 0x0100UL | |
192 | ||
193 | #define DATA_FIELD_USER 0x0001UL | |
194 | #define DATA_FIELD_DATE 0x0002UL | |
195 | #define DATA_FIELD_TIME 0x0004UL | |
196 | #define DATA_FIELD_URL 0x0008UL | |
197 | #define DATA_FIELD_CONNECT 0x0010UL | |
198 | #define DATA_FIELD_BYTES 0x0020UL | |
199 | #define DATA_FIELD_IN_CACHE 0x0040UL | |
200 | #define DATA_FIELD_OUT_CACHE 0x0080UL | |
201 | #define DATA_FIELD_ELAPSED 0x0100UL | |
202 | ||
203 | #define TOPUSERFIELDS_NUM 0x0001UL | |
204 | #define TOPUSERFIELDS_DATE_TIME 0x0002UL | |
205 | #define TOPUSERFIELDS_USERID 0x0004UL | |
206 | #define TOPUSERFIELDS_CONNECT 0x0008UL | |
207 | #define TOPUSERFIELDS_BYTES 0x0010UL | |
208 | #define TOPUSERFIELDS_SETYB 0x0020UL | |
209 | #define TOPUSERFIELDS_IN_CACHE_OUT 0x0040UL | |
210 | #define TOPUSERFIELDS_USED_TIME 0x0080UL | |
211 | #define TOPUSERFIELDS_MILISEC 0x0100UL | |
212 | #define TOPUSERFIELDS_PTIME 0x0200UL | |
213 | #define TOPUSERFIELDS_TOTAL 0x0400UL | |
214 | #define TOPUSERFIELDS_AVERAGE 0x0800UL | |
215 | ||
216 | #define USERREPORTFIELDS_CONNECT 0x0001UL | |
217 | #define USERREPORTFIELDS_BYTES 0x0002UL | |
218 | #define USERREPORTFIELDS_SETYB 0x0004UL | |
219 | #define USERREPORTFIELDS_IN_CACHE_OUT 0x0008UL | |
220 | #define USERREPORTFIELDS_USED_TIME 0x0010UL | |
221 | #define USERREPORTFIELDS_MILISEC 0x0020UL | |
222 | #define USERREPORTFIELDS_PTIME 0x0040UL | |
223 | #define USERREPORTFIELDS_TOTAL 0x0080UL | |
224 | #define USERREPORTFIELDS_AVERAGE 0x0100UL | |
225 | ||
0349fa24 FM |
226 | #define INDEX_YES 0x0001UL |
227 | #define INDEX_NO 0x0002UL | |
228 | #define INDEX_ONLY 0x0004UL | |
229 | ||
230 | #define INDEX_TREE_DATE 0x0001UL | |
231 | #define INDEX_TREE_FILE 0x0002UL | |
232 | ||
9aaa3361 FM |
233 | #define INDEXFIELDS_DIRSIZE 0x0001UL |
234 | ||
f2ec8c75 FM |
235 | #define NTLMUSERFORMAT_USER 0x0001UL |
236 | #define NTLMUSERFORMAT_DOMAINUSER 0x0002UL | |
237 | ||
238 | #define RECORDWITHOUTUSER_IP 0x0001UL | |
239 | #define RECORDWITHOUTUSER_IGNORE 0x0002UL | |
240 | #define RECORDWITHOUTUSER_EVERYBODY 0x0004UL | |
241 | ||
f84a35a3 FM |
242 | #define DATAFILEURL_IP 0x0001UL |
243 | #define DATAFILEURL_NAME 0x0002UL | |
244 | ||
e43854ef FM |
245 | #define DISPLAY_BYTES 0x0001UL |
246 | #define DISPLAY_ABBREV 0x0002UL | |
247 | ||
43cc1649 FM |
248 | #define DATETIME_ELAP 0x0001UL |
249 | #define DATETIME_BYTE 0x0002UL | |
250 | ||
c02d38bb FM |
251 | #define REALTIME_UNAUTH_REC_SHOW 0x0001UL |
252 | #define REALTIME_UNAUTH_REC_IGNORE 0x0002UL | |
71d78774 | 253 | |
15d5372b FM |
254 | #define SORT_REVERSE 0x0001 |
255 | ||
256 | #define TOPUSER_SORT_REVERSE SORT_REVERSE | |
257 | #define TOPUSER_SORT_BYTES 0x0002UL | |
258 | #define TOPUSER_SORT_USER 0x0004UL | |
259 | #define TOPUSER_SORT_CONNECT 0x0008UL | |
260 | #define TOPUSER_SORT_TIME 0x0010UL | |
261 | ||
262 | #define TOPSITE_SORT_REVERSE SORT_REVERSE | |
263 | #define TOPSITE_SORT_BYTES 0x0002UL | |
264 | #define TOPSITE_SORT_CONNECT 0x0004UL | |
70cab1a4 | 265 | #define TOPSITE_SORT_TIME 0x0008UL |
7d82ea1a | 266 | #define TOPSITE_SORT_USER 0x0010UL |
15d5372b FM |
267 | |
268 | #define USER_SORT_REVERSE SORT_REVERSE | |
269 | #define USER_SORT_BYTES 0x0002UL | |
270 | #define USER_SORT_SITE 0x0004UL | |
271 | #define USER_SORT_CONNECT 0x0008UL | |
272 | #define USER_SORT_TIME 0x0010UL | |
273 | ||
2e96438d FM |
274 | //! Value to exclude all the javascripts from the html page. |
275 | #define HTML_JS_NONE 0x0000 | |
276 | //! Bit to include sorttable.js in the html plage. | |
277 | #define HTML_JS_SORTTABLE 0x0001 | |
278 | ||
67a93701 FM |
279 | //! The character prefixed in front of the host names that are aliased. |
280 | #define ALIAS_PREFIX '*' | |
281 | ||
2e29ae23 FM |
282 | //! Maximum number of limit files that can be stored. |
283 | #define MAX_USER_LIMITS 16 | |
284 | ||
fa6552b0 FM |
285 | struct periodstruct |
286 | { | |
fd46f082 | 287 | //! The first date of the period. |
fa6552b0 | 288 | struct tm start; |
fd46f082 | 289 | //! The last date of the period. |
fa6552b0 | 290 | struct tm end; |
fd46f082 | 291 | //! The textual representation of the date. |
fa6552b0 | 292 | char text[40]; |
fd46f082 FM |
293 | //! The HTML representation of the date. |
294 | char html[40]; | |
fa6552b0 FM |
295 | }; |
296 | ||
25697a35 | 297 | char outdir[MAXLEN]; |
d5d021c5 | 298 | char outdirname[MAXLEN]; |
fa6552b0 | 299 | struct periodstruct period; |
d6e703cc FM |
300 | char code[MAXLEN]; |
301 | char code2[MAXLEN]; | |
25697a35 | 302 | char tmp[MAXLEN]; |
25697a35 | 303 | char parse_out[MAXLEN]; |
25697a35 | 304 | char html[MAXLEN]; |
25697a35 | 305 | char ConfigFile[MAXLEN]; |
81a022d8 | 306 | char df; |
0511cf2d | 307 | int LastLog; |
06b39c87 | 308 | bool RemoveTempFiles; |
25697a35 | 309 | char ReplaceIndex[256]; |
0349fa24 | 310 | unsigned long int Index; |
06b39c87 | 311 | bool OverwriteReport; |
f2ec8c75 | 312 | unsigned long int RecordsWithoutUser; |
06b39c87 | 313 | bool UseComma; |
4af2f8ff | 314 | char MailUtility[PATH_MAX]; |
c0ec9cc7 | 315 | int TopSitesNum; |
fb7c5f27 | 316 | int TopUsersNum; |
25697a35 | 317 | char ExcludeCodes[256]; |
15d5372b | 318 | unsigned long int TopsitesSort; |
085c1e1f | 319 | unsigned long int ReportType; |
25697a35 GS |
320 | char UserTabFile[255]; |
321 | char warea[MAXLEN]; | |
322 | char name[MAXLEN]; | |
06b39c87 FM |
323 | bool LongUrl; |
324 | bool Ip2Name; | |
0a4e18e1 | 325 | int AccessLogFromCmdLine; |
25697a35 GS |
326 | char Title[MAXLEN]; |
327 | char BgColor[MAXLEN]; | |
328 | char BgImage[MAXLEN]; | |
329 | char TxColor[MAXLEN]; | |
330 | char TxBgColor[MAXLEN]; | |
331 | char TiColor[MAXLEN]; | |
332 | char LogoImage[MAXLEN]; | |
333 | char LogoText[MAXLEN]; | |
334 | char LogoTextColor[MAXLEN]; | |
335 | char Width[MAXLEN]; | |
336 | char Height[MAXLEN]; | |
337 | char FontFace[MAXLEN]; | |
338 | char HeaderColor[MAXLEN]; | |
339 | char HeaderBgColor[MAXLEN]; | |
340 | char FontSize[MAXLEN]; | |
341 | char PasswdFile[MAXLEN]; | |
342 | char TempDir[MAXLEN]; | |
343 | char OutputDir[MAXLEN]; | |
344 | char OutputEmail[MAXLEN]; | |
15d5372b FM |
345 | unsigned long int TopuserSort; |
346 | unsigned long int UserSort; | |
25697a35 GS |
347 | char UserAgentLog[255]; |
348 | char module[255]; | |
349 | char ExcludeHosts[255]; | |
350 | char ExcludeUsers[255]; | |
81a022d8 | 351 | char DateFormat; |
06b39c87 | 352 | bool UserIp; |
25697a35 | 353 | char MaxElapsed[255]; |
43cc1649 | 354 | unsigned long int datetimeby; |
25697a35 GS |
355 | char CharSet[255]; |
356 | char UserInvalidChar[255]; | |
06b39c87 | 357 | bool Graphs; |
25697a35 | 358 | char GraphDaysBytesBarColor[255]; |
06b39c87 | 359 | bool Privacy; |
25697a35 GS |
360 | char PrivacyString[255]; |
361 | char PrivacyStringColor[30]; | |
362 | char IncludeUsers[MAXLEN]; | |
363 | char ExcludeString[MAXLEN]; | |
06b39c87 | 364 | bool SuccessfulMsg; |
085c1e1f FM |
365 | unsigned long int TopUserFields; |
366 | unsigned long int UserReportFields; | |
25697a35 GS |
367 | char DataFile[MAXLEN]; |
368 | char DataFileDelimiter[3]; | |
085c1e1f | 369 | unsigned long int DataFileFields; |
f84a35a3 | 370 | unsigned long int DataFileUrl; |
2f4787e6 | 371 | //! if \c true, show the number of lines read from the input log file during the reading of the file. |
06b39c87 | 372 | bool ShowReadStatistics; |
2f4787e6 FM |
373 | /*! |
374 | If \c true, the read statistics also includes the percent of the number of lines read. | |
375 | ||
376 | Beware that it requires two readings of the input log file. It is not possible if the | |
377 | input log file is stdin or a pipe. | |
378 | */ | |
379 | bool ShowReadPercent; | |
25697a35 GS |
380 | char IndexSortOrder[5]; |
381 | char DansGuardianConf[MAXLEN]; | |
64dfb824 | 382 | bool DansguardianFilterOutDate; |
25697a35 GS |
383 | char SquidGuardConf[MAXLEN]; |
384 | char SquidGuarddbHome[255]; | |
1f482a8d FM |
385 | char RedirectorLogFormat[4096]; |
386 | int NRedirectorLogs; | |
387 | char RedirectorLogs[MAX_REDIRECTOR_LOGS][MAX_REDIRECTOR_FILELEN]; | |
388 | int RedirectorLogFromCmdLine; | |
64dfb824 | 389 | bool RedirectorFilterOutDate; |
06b39c87 FM |
390 | bool ShowSargInfo; |
391 | bool BytesInSitesUsersReport; | |
392 | bool ShowSargLogo; | |
25697a35 | 393 | char ParsedOutputLog[MAXLEN]; |
ff8d5836 | 394 | char ParsedOutputLogCompress[512]; |
e43854ef | 395 | unsigned long int DisplayedValues; |
933aca19 | 396 | char HeaderFontSize[5]; |
491b862f | 397 | char TitleFontSize[5]; |
25697a35 GS |
398 | char wwwDocumentRoot[MAXLEN]; |
399 | char ExternalCSSFile[MAXLEN]; | |
400 | char BlockIt[255]; | |
f2ec8c75 | 401 | unsigned long int NtlmUserFormat; |
9aaa3361 | 402 | //! How to display the index of the reports. |
0349fa24 | 403 | unsigned long int IndexTree; |
9aaa3361 FM |
404 | //! The columns to show in the index of the reports. |
405 | unsigned long int IndexFields; | |
06b39c87 | 406 | bool UserAuthentication; |
d5d021c5 | 407 | char AuthUserTemplateFile[1024]; |
829a53c2 FM |
408 | //! \c True to use anonymous file and directory names in the report. |
409 | bool AnonymousOutputFiles; | |
25697a35 | 410 | char val1[MAXLEN]; |
25697a35 | 411 | char val3[MAXLEN]; |
25697a35 GS |
412 | char val5[MAXLEN]; |
413 | char val6[MAXLEN]; | |
414 | char val7[MAXLEN]; | |
415 | char val8[MAXLEN]; | |
416 | char val9[MAXLEN]; | |
417 | char val10[MAXLEN]; | |
418 | char val11[MAXLEN]; | |
25697a35 | 419 | char mask[MAXLEN]; |
25697a35 GS |
420 | char site[MAXLEN]; |
421 | char us[50]; | |
422 | char email[MAXLEN]; | |
423 | char test[1]; | |
25697a35 GS |
424 | char user2[MAXLEN]; |
425 | char wentp[512]; | |
426 | char addr[MAXLEN]; | |
491b862f GS |
427 | char Ulimit[6]; |
428 | char RealtimeTypes[1024]; | |
25697a35 | 429 | char cmd[255]; |
491b862f | 430 | char ImageFile[255]; |
71d78774 | 431 | unsigned long int RealtimeUnauthRec; |
e3af0ae9 PO |
432 | char LDAPHost[255]; |
433 | char LDAPBindDN[512]; | |
434 | char LDAPBindPW[255]; | |
965c4a6f FM |
435 | int LDAPPort; |
436 | int LDAPProtocolVersion; | |
e3af0ae9 PO |
437 | char LDAPBaseSearch[255]; |
438 | char LDAPFilterSearch[512]; | |
439 | char LDAPTargetAttr[64]; | |
fd75cd90 FM |
440 | //! Character set to convert the LDAP returned string to. |
441 | char LDAPNativeCharset[20]; | |
3becf85c | 442 | char GraphFont[MAXLEN]; |
ea275279 FM |
443 | //! The full path to sorttable.js if the table in the reports must be dynamicaly sorted. |
444 | char SortTableJs[256]; | |
22715352 FM |
445 | //! The name of the file containing the host names to replace by an alias in the report. |
446 | char HostAliasFile[512]; | |
c4f0ea8f FM |
447 | //! The name of the file containing the user names to replace by an alias in the report. |
448 | char UserAliasFile[512]; | |
4d62cb0a FM |
449 | //! The number of consecutive errors allowed in an input log file before the process is interrupted. |
450 | int NumLogSuccessiveErrors; | |
451 | /*! | |
452 | The total number of errors allowed in an input log file before the process is interrupted. A negative | |
453 | value means the process should never fails irrespective of the number of errors found in the input | |
454 | log files. | |
455 | */ | |
456 | int NumLogTotalErrors; | |
0459449f FM |
457 | //! Count the number of lines read from the input log files. |
458 | unsigned long int lines_read; | |
459 | //! Count the number of records kept for the processing. | |
460 | unsigned long int records_kept; | |
461 | //! Count the number of users. | |
462 | unsigned long int nusers; | |
491b862f | 463 | |
25697a35 | 464 | int idate; |
25697a35 | 465 | int dansguardian_count; |
330b1c52 | 466 | int redirector_count; |
c0ec9cc7 | 467 | int useragent_count; |
25697a35 GS |
468 | int z1, z2, z3; |
469 | int ttopen; | |
25697a35 GS |
470 | int sarglog; |
471 | int isalog; | |
2357ef77 | 472 | int dfrom; |
25697a35 | 473 | int duntil; |
11284535 FM |
474 | bool dataonly; |
475 | bool indexonly; | |
476 | bool iprel; | |
25697a35 GS |
477 | int langcode; |
478 | int debug; | |
479 | int debugz; | |
480 | int debugm; | |
481 | int AuthfailReportLimit; | |
482 | int DeniedReportLimit; | |
94ff9470 | 483 | int DownloadReportLimit; |
25697a35 GS |
484 | int SiteUsersReportLimit; |
485 | int DansGuardianReportLimit; | |
486 | int SquidGuardReportLimit; | |
487 | int UserReportLimit; | |
491b862f GS |
488 | int realtime_refresh; |
489 | int realtime_access_log_lines; | |
491b862f | 490 | int rc; |
d6e703cc | 491 | int ntopsites; |
d6e703cc | 492 | int nrepday; |
d6e703cc | 493 | int ntopuser; |
2824ec9b | 494 | bool squid24; |
11767c6a FM |
495 | //! \c True to keep the temporary files for inspection. |
496 | bool KeepTempLog; | |
25697a35 | 497 | |
491b862f GS |
498 | long long int nocost; |
499 | float cost; | |
25697a35 GS |
500 | |
501 | typedef struct | |
502 | { int list[ 24 ]; | |
503 | int len; | |
504 | } numlist; |