diff options
Diffstat (limited to 'iptables/nft-shared.c')
-rw-r--r-- | iptables/nft-shared.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/iptables/nft-shared.c b/iptables/nft-shared.c index 3f018fb2..deb27834 100644 --- a/iptables/nft-shared.c +++ b/iptables/nft-shared.c @@ -589,15 +589,8 @@ void save_firewall_details(const struct iptables_command_state *cs, const char *iniface, unsigned const char *iniface_mask, const char *outiface, - unsigned const char *outiface_mask, - unsigned int format) + unsigned const char *outiface_mask) { - if (!(format & FMT_NOCOUNTS)) { - printf("-c "); - xtables_print_num(cs->counters.pcnt, format); - xtables_print_num(cs->counters.bcnt, format); - } - if (iniface != NULL) { print_iface('i', iniface, iniface_mask, invflags & IPT_INV_VIA_IN); @@ -620,6 +613,12 @@ void save_firewall_details(const struct iptables_command_state *cs, } } +void save_counters(uint64_t pcnt, uint64_t bcnt) +{ + printf("[%llu:%llu] ", (unsigned long long)pcnt, + (unsigned long long)bcnt); +} + void save_matches_and_target(struct xtables_rule_match *m, struct xtables_target *target, const char *jumpto, uint8_t flags, const void *fw) |