Use 64bit counters for accounting

Otherwise with 5-minute reporting we overflow with >= ~100Mbps.

Fixes #12
This commit is contained in:
Samuel Thibault 2022-01-17 23:04:43 +01:00
parent 7c715f16fc
commit 31dedbbe66
4 changed files with 151 additions and 10 deletions

View file

@ -306,7 +306,7 @@ typedef struct
uint32_t pin, pout; // packet counts
uint32_t cin, cout; // byte counts
uint32_t cin_wrap, cout_wrap; // byte counter wrap count (RADIUS accounting giagawords)
uint32_t cin_delta, cout_delta; // byte count changes (for dump_session())
uint64_t cin_delta, cout_delta; // byte count changes (for dump_session())
uint16_t throttle_in; // upstream throttle rate (kbps)
uint16_t throttle_out; // downstream throttle rate
uint8_t filter_in; // input filter index (to ip_filters[N-1]; 0 if none)