summaryrefslogtreecommitdiff
path: root/sys/net/pfvar.h
diff options
context:
space:
mode:
authorDaniel Hartmeier <dhartmei@cvs.openbsd.org>2002-01-09 11:30:54 +0000
committerDaniel Hartmeier <dhartmei@cvs.openbsd.org>2002-01-09 11:30:54 +0000
commit24c495a51bf0769c932f77a566a88fb4369beeff (patch)
tree4a27c4a783e0c72597d1192336cafb512205b87f /sys/net/pfvar.h
parent81cdc565c9c7e4b8822f9e0a282681dd86d76d27 (diff)
Add labels to rules. These are arbitrary names (not to be confused with
tags that will be used to tag packets later on). Add pfctl -z to clear per-rule counters. Add pfctl -s labels to output per-rule counters in terse format and only for rules that have labels. Suggested by Henning Brauer.
Diffstat (limited to 'sys/net/pfvar.h')
-rw-r--r--sys/net/pfvar.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h
index 3a1cc53f793..dd40551847e 100644
--- a/sys/net/pfvar.h
+++ b/sys/net/pfvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfvar.h,v 1.59 2002/01/08 09:31:55 dhartmei Exp $ */
+/* $OpenBSD: pfvar.h,v 1.60 2002/01/09 11:30:53 dhartmei Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -191,6 +191,8 @@ struct pf_rule_addr {
struct pf_rule {
char ifname[IFNAMSIZ];
char rt_ifname[IFNAMSIZ];
+#define PF_RULE_LABEL_SIZE 32
+ char label[PF_RULE_LABEL_SIZE];
struct ifnet *ifp;
struct ifnet *rt_ifp;
struct pf_rule_addr src;
@@ -559,6 +561,7 @@ struct pfioc_tm {
#define DIOCGETBINAT _IOWR('D', 35, struct pfioc_binat)
#define DIOCCHANGEBINAT _IOWR('D', 36, struct pfioc_changebinat)
#define DIOCADDSTATE _IOWR('D', 37, struct pfioc_state)
+#define DIOCCLRRULECTRS _IO ('D', 38)
#ifdef _KERNEL