diff options
author | netblue30 <netblue30@protonmail.com> | 2022-01-07 09:52:00 -0500 |
---|---|---|
committer | netblue30 <netblue30@protonmail.com> | 2022-01-07 09:52:00 -0500 |
commit | 500a56efd310396f142440019aee671b5f747efb (patch) | |
tree | 8effc272b3814207c8b5583e99bcd9b925558dab /src/fnettrace/fnettrace.h | |
parent | fix wrap/nowrap help string in firemon (diff) | |
download | firejail-500a56efd310396f142440019aee671b5f747efb.tar.gz firejail-500a56efd310396f142440019aee671b5f747efb.tar.zst firejail-500a56efd310396f142440019aee671b5f747efb.zip |
more on nettrace
Diffstat (limited to 'src/fnettrace/fnettrace.h')
-rw-r--r-- | src/fnettrace/fnettrace.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/fnettrace/fnettrace.h b/src/fnettrace/fnettrace.h index 93c9613ab..8384f1770 100644 --- a/src/fnettrace/fnettrace.h +++ b/src/fnettrace/fnettrace.h | |||
@@ -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 |