#include <errno.h>
unsigned short port = 2007;
+unsigned update_frequency = 1048576;
struct in_addr *destinations = NULL;
unsigned num_destinations = 0;
// update the central counter after every 1MB (8ms
// at gigabit speeds, should be enough) of sent data
- if (bytes_sent > 1048576) {
+ if (bytes_sent > update_frequency) {
pthread_mutex_lock(&send_mutex);
total_bytes_sent += bytes_sent;
pthread_mutex_unlock(&send_mutex);
// update the central counter after every 1MB (8ms
// at gigabit speeds, should be enough) of received data
- if (bytes_received > 1048576) {
+ if (bytes_received > update_frequency) {
pthread_mutex_lock(&receive_mutex);
total_bytes_received += bytes_received;
pthread_mutex_unlock(&receive_mutex);