}
struct iface_stats {
- long int rx_bytes;
- long int rx_packets;
- long int tx_bytes;
- long int tx_packets;
+ long long rx_bytes;
+ long long rx_packets;
+ long long tx_bytes;
+ long long tx_packets;
};
#define PROC_NETDEV "/proc/net/dev"
stat->tx_bytes = dec_to_longlong(str, &str);
stat->tx_packets = dec_to_longlong(str, &str);
- pr_info("rx_b %ld rx_p %ld tx_b %ld tx_p %ld\n",
+ pr_info("rx_b %lld rx_p %lld tx_b %lld tx_p %lld\n",
stat->rx_bytes, stat->rx_packets,
stat->tx_bytes, stat->tx_packets);
ret = get_iface_stats(*iface_name, &stat);
if (!ret) {
- ret = snprintf(rrd_data, max_str, "%ld:%ld:%ld:%ld",
+ ret = snprintf(rrd_data, max_str, "%lld:%lld:%lld:%lld",
stat.rx_bytes, stat.rx_packets,
stat.tx_bytes, stat.tx_packets);
} else {