summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormlaier <mlaier@FreeBSD.org>2005-07-14 22:22:51 +0000
committermlaier <mlaier@FreeBSD.org>2005-07-14 22:22:51 +0000
commita390027dcd1a460c262d92b75b0845f321b582e7 (patch)
treec0b90ef07ca0fc0656a43a66a46adf7543d9847e /sys
parent841c5ac424184f3ed263a8eefaf9b19018d912de (diff)
downloadFreeBSD-src-a390027dcd1a460c262d92b75b0845f321b582e7.zip
FreeBSD-src-a390027dcd1a460c262d92b75b0845f321b582e7.tar.gz
Export pfsyncstats via sysctl "net.inet.pfsync" in order to print them with
netstat (seperate commit). Requested by: glebius MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r--sys/contrib/pf/net/if_pfsync.c6
-rw-r--r--sys/netinet/in_proto.c7
2 files changed, 10 insertions, 3 deletions
diff --git a/sys/contrib/pf/net/if_pfsync.c b/sys/contrib/pf/net/if_pfsync.c
index 76af305..77b4b5f 100644
--- a/sys/contrib/pf/net/if_pfsync.c
+++ b/sys/contrib/pf/net/if_pfsync.c
@@ -56,6 +56,7 @@
#include <sys/sockio.h>
#include <sys/lock.h>
#include <sys/mutex.h>
+#include <sys/sysctl.h>
#else
#include <sys/ioctl.h>
#include <sys/timeout.h>
@@ -119,8 +120,11 @@ int pfsyncdebug;
struct pfsync_softc pfsyncif;
#endif
struct pfsyncstats pfsyncstats;
-
#ifdef __FreeBSD__
+SYSCTL_DECL(_net_inet_pfsync);
+SYSCTL_STRUCT(_net_inet_pfsync, 0, stats, CTLFLAG_RW,
+ &pfsyncstats, pfsyncstats,
+ "PFSYNC statistics (struct pfsyncstats, net/if_pfsync.h)");
/*
* Locking notes:
diff --git a/sys/netinet/in_proto.c b/sys/netinet/in_proto.c
index 103682f..fd01479 100644
--- a/sys/netinet/in_proto.c
+++ b/sys/netinet/in_proto.c
@@ -301,8 +301,11 @@ SYSCTL_NODE(_net_inet, IPPROTO_AH, ipsec, CTLFLAG_RW, 0, "IPSEC");
#endif /* !FAST_IPSEC */
SYSCTL_NODE(_net_inet, IPPROTO_RAW, raw, CTLFLAG_RW, 0, "RAW");
#ifdef PIM
-SYSCTL_NODE(_net_inet, IPPROTO_PIM, pim, CTLFLAG_RW, 0, "PIM");
+SYSCTL_NODE(_net_inet, IPPROTO_PIM, pim, CTLFLAG_RW, 0, "PIM");
+#endif
+#ifdef DEV_PFSYNC
+SYSCTL_NODE(_net_inet, IPPROTO_PFSYNC, pfsync, CTLFLAG_RW, 0, "PFSYNC");
#endif
#ifdef DEV_CARP
-SYSCTL_NODE(_net_inet, IPPROTO_CARP, carp, CTLFLAG_RW, 0, "CARP");
+SYSCTL_NODE(_net_inet, IPPROTO_CARP, carp, CTLFLAG_RW, 0, "CARP");
#endif
OpenPOWER on IntegriCloud