]> git.ipfire.org Git - thirdparty/sarg.git/blobdiff - include/defs.h
Move the log reading to a separate source file
[thirdparty/sarg.git] / include / defs.h
index 69acaca0a264e2fc164a694ed0ffd2970ee5dbca..8025388b7f67753203f1e18593c5a804b08e30b6 100755 (executable)
@@ -87,6 +87,27 @@ struct globalstatstruct
 //! The object to store the daily statistics.
 typedef struct DayStruct *DayObject;
 
+/*!
+\brief Log filtering criterion.
+*/
+struct ReadLogDataStruct
+{
+       //! The filtering date range.
+       char DateRange[255];
+       //! \c True to filter on hosts.
+       bool HostFilter;
+       //! \c True to filter on users.
+       bool UserFilter;
+       //! Maximum elpased time allowed. Any time greater than this value is set to zero.
+       long int max_elapsed;
+       //! \c True to restrict the log to the system users.
+       bool SysUsers;
+       //! The start time to include in the report(H*100+M). Set to -1 to disable.
+       int StartTime;
+       //! The end time to include in the report(H*100+M). Set to -1 to disable.
+       int EndTime;
+};
+
 // auth.c
 void htaccess(const struct userinfostruct *uinfo);
 
@@ -168,6 +189,9 @@ void longline_destroy(/*@out@*//*@only@*//*@null@*/longline *line_ptr);
 // index.c
 void make_index(void);
 
+// readlog.c
+int ReadLogFile(struct ReadLogDataStruct *Filter);
+
 // realtime.c
 void realtime(void);