mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-06 12:45:13 +02:00
iptaccount: cast from uint64_t to please printf
%llu wants an "unsigned long long", which is not necessarily the same as uint64_t.
This commit is contained in:
@@ -201,12 +201,18 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
if (doCSV)
|
if (doCSV)
|
||||||
printf("%s;%llu;%llu;%llu;%llu\n",
|
printf("%s;%llu;%llu;%llu;%llu\n",
|
||||||
addr_to_dotted(entry->ip), entry->src_packets, entry->src_bytes,
|
addr_to_dotted(entry->ip),
|
||||||
entry->dst_packets, entry->dst_bytes);
|
(unsigned long long)entry->src_packets,
|
||||||
|
(unsigned long long)entry->src_bytes,
|
||||||
|
(unsigned long long)entry->dst_packets,
|
||||||
|
(unsigned long long)entry->dst_bytes);
|
||||||
else
|
else
|
||||||
printf("IP: %s SRC packets: %llu bytes: %llu DST packets: %llu bytes: %llu\n",
|
printf("IP: %s SRC packets: %llu bytes: %llu DST packets: %llu bytes: %llu\n",
|
||||||
addr_to_dotted(entry->ip), entry->src_packets, entry->src_bytes,
|
addr_to_dotted(entry->ip),
|
||||||
entry->dst_packets, entry->dst_bytes);
|
(unsigned long long)entry->src_packets,
|
||||||
|
(unsigned long long)entry->src_bytes,
|
||||||
|
(unsigned long long)entry->dst_packets,
|
||||||
|
(unsigned long long)entry->dst_bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (doContinue)
|
if (doContinue)
|
||||||
|
Reference in New Issue
Block a user