-
-
Notifications
You must be signed in to change notification settings - Fork 185
/
config.h
71 lines (64 loc) · 1.5 KB
/
config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* Pi-hole: A black hole for Internet advertisements
* (c) 2019 Pi-hole, LLC (https://pi-hole.net)
* Network-wide ad blocking via your own hardware.
*
* FTL Engine
* FTL config file prototypes
*
* This file is copyright under the latest version of the EUPL.
* Please see LICENSE file for your rights under this license. */
#ifndef CONFIG_H
#define CONFIG_H
// enum privacy_level
#include "enums.h"
// typedef int16_t
#include <sys/types.h>
// typedef uni32_t
#include <idn-int.h>
void getLogFilePath(void);
void read_FTLconf(void);
void get_privacy_level(FILE *fp);
void get_blocking_mode(FILE *fp);
void read_debuging_settings(FILE *fp);
typedef struct {
int maxDBdays;
int port;
int maxlogage;
int dns_port;
unsigned int delay_startup;
enum debug_flags debug;
unsigned int network_expire;
enum privacy_level privacylevel;
enum blocking_mode blockingmode;
enum refresh_hostnames refresh_hostnames;
bool socket_listenlocal;
bool analyze_AAAA;
bool resolveIPv6;
bool resolveIPv4;
bool ignore_localhost;
bool analyze_only_A_AAAA;
bool DBimport;
bool DBexport;
bool parse_arp_cache;
bool cname_inspection;
bool block_esni;
bool names_from_netdb;
bool edns0_ecs;
time_t DBinterval;
} ConfigStruct;
typedef struct {
const char* conf;
const char* snapConf;
char* log;
char* pid;
char* port;
char* socketfile;
char* FTL_db;
char* gravity_db;
char* macvendor_db;
char* setupVars;
char* auditlist;
} FTLFileNamesStruct;
extern ConfigStruct config;
extern FTLFileNamesStruct FTLfiles;
#endif //CONFIG_H