diff options
Diffstat (limited to 'src/fnettrace/fnettrace.h')
-rw-r--r-- | src/fnettrace/fnettrace.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/fnettrace/fnettrace.h b/src/fnettrace/fnettrace.h index 93c9613ab..66b7378da 100644 --- a/src/fnettrace/fnettrace.h +++ b/src/fnettrace/fnettrace.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2014-2021 Firejail Authors | 2 | * Copyright (C) 2014-2022 Firejail Authors |
3 | * | 3 | * |
4 | * This file is part of firejail project | 4 | * This file is part of firejail project |
5 | * | 5 | * |
@@ -27,12 +27,13 @@ | |||
27 | #include <netinet/in.h> | 27 | #include <netinet/in.h> |
28 | #include <time.h> | 28 | #include <time.h> |
29 | #include <stdarg.h> | 29 | #include <stdarg.h> |
30 | //#define DEBUG 1 | ||
30 | 31 | ||
31 | //#define NETLOCK_INTERVAL 15 | 32 | #define NETLOCK_INTERVAL 60 // seconds |
32 | #define NETLOCK_INTERVAL 60 | 33 | #define DISPLAY_INTERVAL 2 // seconds |
33 | #define DISPLAY_INTERVAL 3 | 34 | #define DISPLAY_TTL 4 // display intervals (4 * 2 seconds) |
35 | #define DISPLAY_BW_UNITS 20 // length of the bandwidth bar | ||
34 | 36 | ||
35 | void logprintf(char* fmt, ...); | ||
36 | 37 | ||
37 | static inline void ansi_topleft(void) { | 38 | static inline void ansi_topleft(void) { |
38 | char str[] = {0x1b, '[', '1', ';', '1', 'H', '\0'}; | 39 | char str[] = {0x1b, '[', '1', ';', '1', 'H', '\0'}; |
@@ -53,6 +54,12 @@ static inline uint8_t hash(uint32_t ip) { | |||
53 | return *ptr ^ *(ptr + 1) ^ *(ptr + 2) ^ *(ptr + 3); | 54 | return *ptr ^ *(ptr + 1) ^ *(ptr + 2) ^ *(ptr + 3); |
54 | } | 55 | } |
55 | 56 | ||
57 | // main.c | ||
58 | void logprintf(char* fmt, ...); | ||
56 | 59 | ||
60 | // hostnames.c | ||
61 | extern int geoip_calls; | ||
62 | void load_hostnames(const char *fname); | ||
63 | char* retrieve_hostname(uint32_t ip); | ||
57 | 64 | ||
58 | #endif \ No newline at end of file | 65 | #endif \ No newline at end of file |