diff options
author | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2001-08-11 12:05:01 +0000 |
---|---|---|
committer | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2001-08-11 12:05:01 +0000 |
commit | b7d10a986fcd6d83d5e1febbc145b267b8f7152c (patch) | |
tree | 0f12670233f634c76dcd2185748b78126f6f55c2 /sbin/pfctl/pfctl_parser.c | |
parent | 117e49e4fe673065b85ff3a47f437f8b43ff1baa (diff) |
Add support for ICMP errors referring to ICMP queries/replies. Fixes
'ICMP error message for bad proto' messages. Reported by Mark Grimes
and Steve Rumble.
Add debugging level with ioctl interface and pfctl switch. Default
is 'None'.
Diffstat (limited to 'sbin/pfctl/pfctl_parser.c')
-rw-r--r-- | sbin/pfctl/pfctl_parser.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index f9f4266eb92..1fff22a4774 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_parser.c,v 1.39 2001/07/19 00:07:36 krw Exp $ */ +/* $OpenBSD: pfctl_parser.c,v 1.40 2001/08/11 12:05:00 dhartmei Exp $ */ /* * Copyright (c) 2001, Daniel Hartmeier @@ -348,10 +348,21 @@ print_status(struct pf_status *s) time_t t = time(NULL); int i; - printf("Status: %s Time: %u Since: %u\n", + printf("Status: %s Time: %u Since: %u Debug: ", s->running ? "Enabled" : "Disabled", t, s->since); - printf("Bytes In: %-10llu Bytes Out: %-10llu\n", + switch (s->debug) { + case 0: + printf("None"); + break; + case 1: + printf("Urgent"); + break; + case 2: + printf("Misc"); + break; + } + printf("\nBytes In: %-10llu Bytes Out: %-10llu\n", s->bcounters[PF_IN], s->bcounters[PF_OUT]); printf("Inbound Packets: Passed: %-10llu Dropped: %-10llu\n", s->pcounters[PF_IN][PF_PASS], |