mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
5c75fc3e67
Signed-off-by: DL6ER <dl6er@dl6er.de>
38 lines
893 B
C
38 lines
893 B
C
/* Pi-hole: A black hole for Internet advertisements
|
|
* (c) 2018 Pi-hole, LLC (https://pi-hole.net)
|
|
* Network-wide ad blocking via your own hardware.
|
|
*
|
|
* FTL Engine
|
|
* Over Time data header
|
|
*
|
|
* This file is copyright under the latest version of the EUPL.
|
|
* Please see LICENSE file for your rights under this license. */
|
|
|
|
#ifndef OVERTIME_H
|
|
#define OVERTIME_H
|
|
|
|
void initOverTime(void);
|
|
unsigned int getOverTimeID(const time_t timestamp);
|
|
|
|
/**
|
|
* Move the overTime slots so the oldest interval starts with mintime. The time
|
|
* given will be aligned to OVERTIME_INTERVAL.
|
|
*
|
|
* @param mintime The start of the oldest interval
|
|
*/
|
|
void moveOverTimeMemory(const time_t mintime);
|
|
|
|
typedef struct {
|
|
unsigned char magic;
|
|
time_t timestamp;
|
|
int total;
|
|
int blocked;
|
|
int cached;
|
|
int forwarded;
|
|
int querytypedata[TYPE_MAX-1];
|
|
} overTimeData;
|
|
|
|
extern overTimeData *overTime;
|
|
|
|
#endif //OVERTIME_H
|