mirror of
https://github.com/pi-hole/FTL.git
synced 2025-12-20 02:19:21 +00:00
4
FTL.h
4
FTL.h
@@ -7,6 +7,8 @@
|
||||
*
|
||||
* This file is copyright under the latest version of the EUPL.
|
||||
* Please see LICENSE file for your rights under this license. */
|
||||
#ifndef FTL_H
|
||||
#define FTL_H
|
||||
|
||||
#define __USE_XOPEN
|
||||
#define _GNU_SOURCE
|
||||
@@ -322,3 +324,5 @@ clientsData* _getClient(int clientID, bool checkMagic, int line, const char * fu
|
||||
domainsData* _getDomain(int domainID, bool checkMagic, int line, const char * function, const char * file);
|
||||
#define getForward(forwardID, checkMagic) _getForward(forwardID, checkMagic, __LINE__, __FUNCTION__, __FILE__)
|
||||
forwardedData* _getForward(int forwardID, bool checkMagic, int line, const char * function, const char * file);
|
||||
|
||||
#endif // FTL_H
|
||||
|
||||
5
Makefile
5
Makefile
@@ -141,11 +141,14 @@ clean:
|
||||
version~: force
|
||||
@echo '$(GIT_BRANCH) $(GIT_VERSION) $(GIT_DATE) $(GIT_TAG)' | cmp -s - $@ || echo '$(GIT_BRANCH) $(GIT_VERSION) $(GIT_DATE) $(GIT_TAG)' > $@
|
||||
version.h: version~
|
||||
@echo '#define GIT_VERSION "$(GIT_VERSION)"' > "$@"
|
||||
@echo '#ifndef VERSION_H' > "$@"
|
||||
@echo '#define VERSION_H' >> "$@"
|
||||
@echo '#define GIT_VERSION "$(GIT_VERSION)"' >> "$@"
|
||||
@echo '#define GIT_DATE "$(GIT_DATE)"' >> "$@"
|
||||
@echo '#define GIT_BRANCH "$(GIT_BRANCH)"' >> "$@"
|
||||
@echo '#define GIT_TAG "$(GIT_TAG)"' >> "$@"
|
||||
@echo '#define GIT_HASH "$(GIT_HASH)"' >> "$@"
|
||||
@echo '#endif // VERSION_H' >> "$@"
|
||||
@echo "Making FTL version on branch $(GIT_BRANCH) - $(GIT_VERSION) ($(GIT_DATE))"
|
||||
|
||||
prefix=/usr
|
||||
|
||||
4
api.h
4
api.h
@@ -7,6 +7,8 @@
|
||||
*
|
||||
* This file is copyright under the latest version of the EUPL.
|
||||
* Please see LICENSE file for your rights under this license. */
|
||||
#ifndef API_H
|
||||
#define API_H
|
||||
|
||||
// Statistic methods
|
||||
void getStats(const int *sock);
|
||||
@@ -42,3 +44,5 @@ void pack_float(const int sock, const float value);
|
||||
bool pack_fixstr(const int sock, const char *string);
|
||||
bool pack_str32(const int sock, const char *string);
|
||||
void pack_map16_start(const int sock, const uint16_t length);
|
||||
|
||||
#endif // API_H
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
*
|
||||
* This file is copyright under the latest version of the EUPL.
|
||||
* Please see LICENSE file for your rights under this license. */
|
||||
#ifndef DNSMASQ_INTERFACE_H
|
||||
#define DNSMASQ_INTERFACE_H
|
||||
|
||||
extern int socketfd, telnetfd4, telnetfd6;
|
||||
extern unsigned char* pihole_privacylevel;
|
||||
enum { TCP, UDP };
|
||||
@@ -38,3 +41,5 @@ void _FTL_upstream_error(const unsigned int rcode, const int id, const char* fil
|
||||
void FTL_dnsmasq_reload(void);
|
||||
void FTL_fork_and_bind_sockets(struct passwd *ent_pw);
|
||||
int FTL_listsfile(const char* filename, unsigned int index, FILE *f, int cache_size, struct crec **rhash, int hashsz);
|
||||
|
||||
#endif // DNSMASQ_INTERFACE_H
|
||||
|
||||
@@ -7,7 +7,10 @@
|
||||
*
|
||||
* This file is copyright under the latest version of the EUPL.
|
||||
* Please see LICENSE file for your rights under this license. */
|
||||
#ifndef ROUTINES_H
|
||||
#define ROUTINES_H
|
||||
|
||||
// daemon.c
|
||||
void go_daemon(void);
|
||||
void timer_start(const int i);
|
||||
double timer_elapsed_msec(const int i);
|
||||
@@ -16,6 +19,7 @@ void savepid(void);
|
||||
char * getUserName(void);
|
||||
void removepid(void);
|
||||
|
||||
// log.c
|
||||
void open_FTL_log(const bool test);
|
||||
void logg(const char* format, ...) __attribute__ ((format (gnu_printf, 1, 2)));
|
||||
void log_counter_info(void);
|
||||
@@ -150,3 +154,5 @@ bool check_capabilities(void);
|
||||
bool create_network_table(void);
|
||||
void parse_arp_cache(void);
|
||||
void updateMACVendorRecords(void);
|
||||
|
||||
#endif // ROUTINES_H
|
||||
|
||||
Reference in New Issue
Block a user