From 2d1839289eca016893b898dc713cbf1a1df92fc1 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Mon, 1 Mar 2021 11:55:15 +1100 Subject: Fix integer sizing issues in the NetworkIO Meter On Linux kernels the size of the values exported for network device bytes and packets has used a 64 bit integer for quite some time (2.6+ IIRC). Make the procfs value extraction use correct types and change internal types used to rate convert these counters (within the NetworkIO Meter) 64 bit integers, where appropriate. --- NetworkIOMeter.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'NetworkIOMeter.h') diff --git a/NetworkIOMeter.h b/NetworkIOMeter.h index 311b5e64..5b29fa84 100644 --- a/NetworkIOMeter.h +++ b/NetworkIOMeter.h @@ -3,6 +3,13 @@ #include "Meter.h" +typedef struct NetworkIOData_ { + unsigned long long int bytesReceived; + unsigned long long int packetsReceived; + unsigned long long int bytesTransmitted; + unsigned long long int packetsTransmitted; +} NetworkIOData; + extern const MeterClass NetworkIOMeter_class; #endif /* HEADER_NetworkIOMeter */ -- cgit v1.2.3