diff options
Diffstat (limited to 'src/fnettrace/fnettrace.h')
-rw-r--r-- | src/fnettrace/fnettrace.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/fnettrace/fnettrace.h b/src/fnettrace/fnettrace.h index 93c9613ab..c2f76f3a6 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,14 @@ | |||
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 15 |
32 | #define NETLOCK_INTERVAL 60 | 33 | #define NETLOCK_INTERVAL 60 |
33 | #define DISPLAY_INTERVAL 3 | 34 | #define DISPLAY_INTERVAL 2 |
35 | #define DISPLAY_TTL 4 | ||
36 | #define DISPLAY_BW_UNITS 20 | ||
34 | 37 | ||
35 | void logprintf(char* fmt, ...); | ||
36 | 38 | ||
37 | static inline void ansi_topleft(void) { | 39 | static inline void ansi_topleft(void) { |
38 | char str[] = {0x1b, '[', '1', ';', '1', 'H', '\0'}; | 40 | char str[] = {0x1b, '[', '1', ';', '1', 'H', '\0'}; |
@@ -53,6 +55,12 @@ static inline uint8_t hash(uint32_t ip) { | |||
53 | return *ptr ^ *(ptr + 1) ^ *(ptr + 2) ^ *(ptr + 3); | 55 | return *ptr ^ *(ptr + 1) ^ *(ptr + 2) ^ *(ptr + 3); |
54 | } | 56 | } |
55 | 57 | ||
58 | // main.c | ||
59 | void logprintf(char* fmt, ...); | ||
56 | 60 | ||
61 | // hostnames.c | ||
62 | void load_hostnames(const char *fname); | ||
63 | char* retrieve_hostname(uint32_t ip); | ||
64 | void build_list(const char *fname); | ||
57 | 65 | ||
58 | #endif \ No newline at end of file | 66 | #endif \ No newline at end of file |