]>
Commit | Line | Data |
---|---|---|
9c7c6346 FM |
1 | |
2 | struct getwordstruct | |
3 | { | |
4 | const char *current; | |
5 | const char *beginning; | |
e5b2c6f0 | 6 | int modified; |
9c7c6346 FM |
7 | }; |
8 | ||
ac422f9b FM |
9 | struct longlinestruct |
10 | { | |
11 | //! The buffer to store the data read from the log file. | |
12 | char *buffer; | |
13 | //! The size of the buffer. | |
14 | size_t size; | |
15 | //! The number of bytes stored in the buffer. | |
16 | size_t length; | |
17 | //! The position of the beginning of the current string. | |
18 | size_t start; | |
19 | //! The position of the end of the current string. | |
20 | size_t end; | |
21 | }; | |
22 | ||
2240dcea FM |
23 | struct generalitemstruct |
24 | { | |
25 | //! \c True if the entry is for the total of the file or \c false if it is a single line. | |
26 | int total; | |
27 | //! The user to which the entry apply. The length is limited to ::MAX_USER_LEN. | |
28 | char *user; | |
29 | //! The number of accesses performed by the user. | |
30 | long long nacc; | |
31 | //! The number of bytes transfered. | |
32 | long long nbytes; | |
33 | //! The URL accessed by the user. The length is not limited. | |
34 | char *url; | |
35 | //! The source IP address of the user. The length is limited to ::MAX_IP_LEN. | |
36 | char *ip; | |
37 | //! The time of the access. The length is limited to ::MAX_DATETIME_LEN. | |
38 | char *time; | |
39 | //! The date of the access. The length is limited to ::MAX_DATETIME_LEN. | |
40 | char *date; | |
41 | //! The number of milliseconds spend processing the request. | |
42 | long long nelap; | |
43 | //! The number of bytes fetched from the cache of the proxy (cache hit). | |
44 | long long incache; | |
45 | //! The number of bytes fetched from the site (cache miss). | |
46 | long long oucache; | |
47 | }; | |
48 | ||
5f3cfd1d FM |
49 | // auth.c |
50 | void htaccess(const char *name); | |
51 | ||
52 | // authfail.c | |
53 | void authfail_report(void); | |
54 | ||
55 | // charset.c | |
56 | void ccharset(char *CharSet); | |
57 | ||
58 | // convlog.c | |
59 | void convlog(const char *arq, char *df, int dfrom, int duntil); | |
60 | ||
61 | // css.c | |
62 | void css(FILE *fp_css); | |
63 | ||
64 | // dansguardian_log.c | |
65 | void dansguardian_log(void); | |
66 | ||
67 | // dansguardian_report.c | |
68 | void dansguardian_report(void); | |
69 | ||
70 | // datafile.c | |
71 | void data_file(char *tmp); | |
72 | ||
73 | // decomp.c | |
74 | void decomp(char *arq, char *zip, const char *tmp); | |
75 | void recomp(const char *arq, const char *zip) ; | |
76 | ||
77 | // denied.c | |
78 | void gen_denied_report(void); | |
79 | ||
80 | // download.c | |
81 | void download_report(void); | |
6e792ade FM |
82 | void free_download(void); |
83 | void set_download_suffix(const char *list); | |
84 | int is_download_suffix(const char *url); | |
5f3cfd1d FM |
85 | |
86 | // email.c | |
87 | int geramail(const char *dirname, int debug, const char *outdir, int userip, const char *email, const char *TempDir); | |
88 | ||
89 | // exclude.c | |
43f18f45 FM |
90 | void gethexclude(const char *hexfile, int debug); |
91 | void getuexclude(const char *uexfile, int debug); | |
92 | int vhexclude(const char *url); | |
93 | int vuexclude(const char *user); | |
94 | int is_indexonly(void); | |
95 | void free_exclude(void); | |
5f3cfd1d FM |
96 | |
97 | // getconf.c | |
98 | void getconf(void); | |
99 | ||
100 | // grepday.c | |
101 | void greport_day(const char *user); | |
c274f011 | 102 | void greport_cleanup(void); |
5f3cfd1d FM |
103 | |
104 | // html.c | |
105 | void htmlrel(void); | |
106 | ||
107 | // indexonly.c | |
108 | void index_only(const char *dirname,int debug); | |
109 | ||
110 | // ip2name.c | |
111 | void ip2name(char *ip,int ip_len); | |
112 | void name2ip(char *name); | |
113 | ||
114 | // language.c | |
115 | void language_load(const char *language); | |
116 | ||
117 | // lastlog.c | |
118 | void mklastlog(const char *outdir); | |
119 | ||
120 | // index.c | |
121 | void make_index(void); | |
122 | ||
123 | // realtime.c | |
124 | void realtime(void); | |
125 | ||
126 | // repday.c | |
127 | void report_day(const char *user); | |
128 | ||
129 | // report.c | |
0a4e18e1 | 130 | void gravatmp(const char *oldaccuser, const char *oldurl, long long int nacc, long long int nbytes, const char *oldmsg, long long int nelap, int indexonly, long long int incache, long long int oucache); |
5f3cfd1d | 131 | void gerarel(void); |
2240dcea | 132 | int ger_read(char *buffer,struct generalitemstruct *item,const char *filename); |
5f3cfd1d FM |
133 | |
134 | // siteuser.c | |
135 | void siteuser(void); | |
136 | ||
137 | // smartfilter.c | |
138 | void smartfilter_report(void); | |
139 | ||
140 | // sort.c | |
141 | void sort_users_log(const char *tmp, int debug); | |
142 | void tmpsort(void); | |
143 | ||
144 | // splitlog.c | |
145 | void splitlog(const char *arq, char *df, int dfrom, int duntil, char *convert); | |
146 | ||
147 | // squidguard_log.c | |
148 | void squidguard_log(void); | |
149 | ||
150 | // squidguard_report.c | |
151 | void squidguard_report(void); | |
152 | ||
153 | // topsites.c | |
154 | void topsites(void); | |
155 | ||
156 | // topuser.c | |
157 | void topuser(void); | |
158 | ||
159 | // totday.c | |
160 | void day_totalize(const char *tmp, const char *user, int indexonly); | |
161 | ||
162 | // totger.c | |
163 | int totalger(const char *dirname, int debug, const char *outdir); | |
164 | ||
165 | // usage.c | |
166 | void usage(const char *prog); | |
167 | ||
168 | // useragent.c | |
169 | void useragent(void); | |
170 | ||
965c4a6f FM |
171 | // usertab.c |
172 | void init_usertab(const char *UserTabFile); | |
173 | void user_find(char *mappedname, int namelen, const char *userlogin); | |
174 | void close_usertab(void); | |
175 | ||
5f3cfd1d | 176 | // util.c |
9c7c6346 FM |
177 | void getword_start(struct getwordstruct *gwarea, const char *line); |
178 | void getword_restart(struct getwordstruct *gwarea); | |
179 | int getword(char *word, int limit, struct getwordstruct *gwarea, int stop); | |
e5b2c6f0 | 180 | int getword_limit(char *word, int limit, struct getwordstruct *gwarea, int stop); |
9c7c6346 FM |
181 | int getword_multisep(char *word, int limit, struct getwordstruct *gwarea, int stop); |
182 | int getword_skip(int limit, struct getwordstruct *gwarea, int stop); | |
0a4e18e1 | 183 | int getword_atoll(long long int *number, struct getwordstruct *gwarea, int stop); |
e5b2c6f0 | 184 | int getword_ptr(char *orig_line,char **word, struct getwordstruct *gwarea, int stop); |
e6414a9d FM |
185 | long long int my_atoll (const char *nptr); |
186 | int is_absolute(const char *path); | |
e3af0ae9 | 187 | int getnumlist(char *, numlist *, const int, const int); |
5f3cfd1d FM |
188 | void name_month(char *month,int month_len); |
189 | void conv_month_name(char *month); | |
190 | void buildymd(const char *dia, const char *mes, const char *ano, char *wdata); | |
191 | void date_from(char *date, char *dfrom, char *duntil); | |
5f3cfd1d FM |
192 | void fixip(char *ip); |
193 | char *fixnum(long long int value, int n); | |
194 | char *fixnum2(long long int value, int n); | |
195 | void fixnone(char *str); | |
196 | void fixper(char *tbuf, char *period, const char *duntil); | |
197 | char *fixtime(long int elap); | |
2357ef77 | 198 | void fixendofline(char *str); |
5f3cfd1d | 199 | void show_info(FILE *fp_ou); |
c0ec9cc7 | 200 | void show_sarg(FILE *fp_ou, int depth); |
dfb337be | 201 | void write_logo_image(FILE *fp_ou); |
c0ec9cc7 FM |
202 | void write_html_header(FILE *fp_ou, int depth, const char *title); |
203 | void close_html_header(FILE *fp_ou); | |
5f3cfd1d | 204 | void write_html_trailer(FILE *fp_ou); |
ac422f9b FM |
205 | void output_html_string(FILE *fp_ou,const char *str,int maxlen); |
206 | void output_html_url(FILE *fp_ou,const char *url); | |
48864d28 | 207 | void subs(char *str, int size, char *from, char *to); |
5f3cfd1d | 208 | void conv_month(char *month); |
d2fe0c32 | 209 | void debuga(const char *msg,...); |
5f3cfd1d | 210 | void debugaz(const char *head, const char *msg); |
e5b2c6f0 | 211 | void my_lltoa(unsigned long long int n, char *s, int ssize, int len); |
5f3cfd1d | 212 | char *get_size(const char *path, const char *file); |
48864d28 | 213 | void url_module(const char *url, char *w2); |
e5b2c6f0 | 214 | void url_to_file(const char *url,char *file,int filesize); |
5f3cfd1d FM |
215 | void strip_latin(char *line); |
216 | char *buildtime(long long int elap); | |
217 | void obtdate(const char *dirname, const char *name, char *data); | |
a1de61fe | 218 | void formatdate(char *date,int date_size,int year,int month,int day,int hour,int minute,int second,int dst); |
5f3cfd1d | 219 | void obtuser(const char *dirname, const char *name, char *tuser); |
6e792ade | 220 | void obttotal(const char *dirname, const char *name, char *tbytes, const char *tuser, char *media); |
5f3cfd1d FM |
221 | void version(void); |
222 | int vercode(const char *code); | |
48864d28 FM |
223 | void load_excludecodes(const char *ExcludeCodes); |
224 | void free_excludecodes(void); | |
5f3cfd1d FM |
225 | void my_mkdir(const char *name); |
226 | int testvaliduserchar(const char *user); | |
227 | char *strlow(char *string); | |
228 | char *strup(char *string); | |
229 | void builddia(char *dia, const char *mes, const char *ano, const char *df, char *wdata); | |
e6414a9d | 230 | void vrfydir(const char *per1, const char *addr, const char *site, const char *us, const char *form); |
48864d28 | 231 | void gperiod(const char *dirname, const char *period); |
5f3cfd1d | 232 | void removetmp(const char *outdir); |
120d768c | 233 | void zdate(char *ftime,int ftimesize, const char *DateFormat); |
5f3cfd1d FM |
234 | void baddata(void); |
235 | char *get_param_value(const char *param,char *line); | |
48864d28 | 236 | int compar( const void *, const void * ); |
51465d08 | 237 | void unlinkdir(const char *dir,int contentonly); |
ac422f9b FM |
238 | int longline_prepare(struct longlinestruct *line); |
239 | char *longline_read(FILE *fp_in,struct longlinestruct *line); | |
240 | void longline_free(struct longlinestruct *line); |