diff options
author | Nathan Scott <nathans@redhat.com> | 2021-03-01 11:55:15 +1100 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2021-03-01 11:55:15 +1100 |
commit | 2d1839289eca016893b898dc713cbf1a1df92fc1 (patch) | |
tree | 70990056703220405da20a7c97e66e3d53dff59c /NetworkIOMeter.h | |
parent | 379421d3b2a5a1cf718b555663ec873ef7ea90d8 (diff) |
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.
Diffstat (limited to 'NetworkIOMeter.h')
-rw-r--r-- | NetworkIOMeter.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 */ |