summaryrefslogtreecommitdiff
path: root/sbin/pfctl/pfctl_table.c
diff options
context:
space:
mode:
authorBret Lambert <blambert@cvs.openbsd.org>2013-07-05 13:07:59 +0000
committerBret Lambert <blambert@cvs.openbsd.org>2013-07-05 13:07:59 +0000
commit76cbef18617368358bd97db20ff50cb8d212c924 (patch)
treed7e6b6a2e8cd333a749f4b791849d9f2b8a0010e /sbin/pfctl/pfctl_table.c
parent6ef46a309357346a959de1eee7f09d64d74de0f3 (diff)
Collect and display 'match' counters for pf tables.
While here, fix pf table displays to fit within 80 chars. Manpage input jmc@ ok henning@ reyk@
Diffstat (limited to 'sbin/pfctl/pfctl_table.c')
-rw-r--r--sbin/pfctl/pfctl_table.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/pfctl/pfctl_table.c b/sbin/pfctl/pfctl_table.c
index 002da62c708..afe4d7f9075 100644
--- a/sbin/pfctl/pfctl_table.c
+++ b/sbin/pfctl/pfctl_table.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_table.c,v 1.71 2011/07/27 00:26:10 mcbride Exp $ */
+/* $OpenBSD: pfctl_table.c,v 1.72 2013/07/05 13:07:57 blambert Exp $ */
/*
* Copyright (c) 2002 Cedric Berger
@@ -64,8 +64,8 @@ static void xprintf(int, const char *, ...);
static void print_iface(struct pfi_kif *, int);
static const char *stats_text[PFR_DIR_MAX][PFR_OP_TABLE_MAX] = {
- { "In/Block:", "In/Pass:", "In/XPass:" },
- { "Out/Block:", "Out/Pass:", "Out/XPass:" }
+ { "In/Block:", "In/Match:", "In/Pass:", "In/XPass:" },
+ { "Out/Block:", "Out/Match:", "Out/Pass:", "Out/XPass:" }
};
static const char *istats_text[2][2][2] = {
@@ -483,7 +483,7 @@ print_astats(struct pfr_astats *as, int dns)
int dir, op;
print_addrx(&as->pfras_a, NULL, dns);
- printf("\tCleared: %s", ctime(&time));
+ printf("\tCleared: %s", ctime(&time));
if (as->pfras_a.pfra_states)
printf("\tActive States: %d\n", as->pfras_a.pfra_states);
if (as->pfras_a.pfra_type == PFRKE_COST)
@@ -494,7 +494,7 @@ print_astats(struct pfr_astats *as, int dns)
return;
for (dir = 0; dir < PFR_DIR_MAX; dir++)
for (op = 0; op < PFR_OP_ADDR_MAX; op++)
- printf("\t%-19s [ Packets: %-18llu Bytes: %-18llu ]\n",
+ printf("\t%-12s [ Packets: %-18llu Bytes: %-18llu ]\n",
stats_text[dir][op],
(unsigned long long)as->pfras_packets[dir][op],
(unsigned long long)as->pfras_bytes[dir][op]);