diff options
author | Roopesh Chander <roop@roopc.net> | 2018-12-13 15:38:10 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2018-12-13 17:37:14 +0530 |
commit | ae7fb7323faf6321d07dd855ea4f7641d2424ec0 (patch) | |
tree | e06c8af688ca2de4c0464b7d206a140d9cf92f3d /WireGuard/Shared/Logging/ringlogger.c | |
parent | Avoid using 'VPN' in code where possible (diff) | |
download | wireguard-apple-ae7fb7323faf6321d07dd855ea4f7641d2424ec0.tar.xz wireguard-apple-ae7fb7323faf6321d07dd855ea4f7641d2424ec0.zip |
Logging: Use ringlogger for logging from the extension
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r-- | WireGuard/Shared/Logging/ringlogger.c (renamed from WireGuard/Shared/RingLogger/ringlogger.c) | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/WireGuard/Shared/RingLogger/ringlogger.c b/WireGuard/Shared/Logging/ringlogger.c index d39b9d7..ea862de 100644 --- a/WireGuard/Shared/RingLogger/ringlogger.c +++ b/WireGuard/Shared/Logging/ringlogger.c @@ -16,23 +16,6 @@ #include <sys/mman.h> #include "ringlogger.h" -enum { - MAX_LOG_LINE_LENGTH = 512, - MAX_LINES = 1024, - MAGIC = 0xdeadbeefU -}; - -struct log_line { - struct timeval tv; - char line[MAX_LOG_LINE_LENGTH]; -}; - -struct log { - struct { uint32_t first, len; } header; - struct log_line lines[MAX_LINES]; - uint32_t magic; -}; - void write_msg_to_log(struct log *log, const char *msg) { struct log_line *line = &log->lines[(log->header.first + log->header.len) % MAX_LINES]; |