X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fraw_socket%2Fdevice.c;h=abe368ad9e60351541df7753561d2f044c1a89af;hp=30bb1845cc2b5bbe4c719ad12b95eab0f4b773c6;hb=6d08eb1614b59d5f86a43edda9db06fca72b76cd;hpb=4c85542894f7fca823b119b05e07179deb24229a diff --git a/src/raw_socket/device.c b/src/raw_socket/device.c index 30bb1845..abe368ad 100644 --- a/src/raw_socket/device.c +++ b/src/raw_socket/device.c @@ -23,6 +23,7 @@ #include #include "conf.h" +#include "device.h" #include "net.h" #include "logger.h" #include "utils.h" @@ -35,8 +36,8 @@ char *iface = NULL; static char ifrname[IFNAMSIZ]; static char *device_info; -static int device_total_in = 0; -static int device_total_out = 0; +static uint64_t device_total_in = 0; +static uint64_t device_total_out = 0; bool setup_device(void) { struct ifreq ifr; @@ -123,6 +124,6 @@ bool write_packet(vpn_packet_t *packet) { void dump_device_stats(void) { logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device); - logger(LOG_DEBUG, " total bytes in: %10d", device_total_in); - logger(LOG_DEBUG, " total bytes out: %10d", device_total_out); + logger(LOG_DEBUG, " total bytes in: %10"PRIu64, device_total_in); + logger(LOG_DEBUG, " total bytes out: %10"PRIu64, device_total_out); }