summaryrefslogtreecommitdiff
path: root/sbin/ipfstat
diff options
context:
space:
mode:
authordm <dm@cvs.openbsd.org>1996-07-18 05:08:40 +0000
committerdm <dm@cvs.openbsd.org>1996-07-18 05:08:40 +0000
commitd863770dbf1c7b1d87285f2c65bde3fe93cd1b9d (patch)
treeafd06cb0f25ed0255313ed8a15dfe0f99cdb7215 /sbin/ipfstat
parent1688332c300a04e1f04f1afcec7ff0a2a0a29e06 (diff)
ipfilter 3.1.0
Diffstat (limited to 'sbin/ipfstat')
-rw-r--r--sbin/ipfstat/fils.c20
-rw-r--r--sbin/ipfstat/ipfstat.89
-rw-r--r--sbin/ipfstat/kmem.c3
-rw-r--r--sbin/ipfstat/kmem.h3
4 files changed, 21 insertions, 14 deletions
diff --git a/sbin/ipfstat/fils.c b/sbin/ipfstat/fils.c
index 2592f0816dd..f0896402065 100644
--- a/sbin/ipfstat/fils.c
+++ b/sbin/ipfstat/fils.c
@@ -1,5 +1,3 @@
-/* $OpenBSD: fils.c,v 1.5 1996/07/10 03:53:49 ccappuc Exp $ */
-
/*
* (C)opyright 1993-1996 by Darren Reed.
*
@@ -29,6 +27,8 @@
#include <netinet/ip.h>
#include <net/if.h>
#include "ip_fil.h"
+#include "ip_fil_compat.h"
+#include "ip_nat.h"
#include "ip_frag.h"
#include "ip_state.h"
#include <netdb.h>
@@ -41,12 +41,13 @@
#endif
#ifndef lint
-static char sccsid[] = "@(#)fils.c 1.20 3/24/96 (C) 1993-1996 Darren Reed";
+static char sccsid[] = "@(#)fils.c 1.21 4/20/96 (C) 1993-1996 Darren Reed";
+static char rcsid[] = "$Id: fils.c,v 1.6 1996/07/18 05:08:09 dm Exp $";
#endif
#ifdef _PATH_UNIX
#define VMUNIX _PATH_UNIX
#else
-#define VMUNIX "/bsd"
+#define VMUNIX "/vmunix"
#endif
extern char *optarg;
@@ -64,6 +65,14 @@ int opts = 0;
static void showstats(), showfrstates();
static void showlist(), showipstates();
+void Usage(name)
+char *name;
+{
+ fprintf(stderr, "Usage: %s [-afhIiosv] [-d <device>]\n", name);
+ exit(1);
+}
+
+
int main(argc,argv)
int argc;
char *argv[];
@@ -114,6 +123,9 @@ char *argv[];
case 'v' :
opts |= OPT_VERBOSE;
break;
+ default :
+ Usage();
+ break;
}
}
diff --git a/sbin/ipfstat/ipfstat.8 b/sbin/ipfstat/ipfstat.8
index ade7b07902c..1b378541580 100644
--- a/sbin/ipfstat/ipfstat.8
+++ b/sbin/ipfstat/ipfstat.8
@@ -1,5 +1,3 @@
-.\" $OpenBSD: ipfstat.8,v 1.5 1996/07/10 03:58:41 ccappuc Exp $
-.\"
.LP
.TH ipfstat 8
.SH NAME
@@ -9,11 +7,10 @@ ipfstat [-hIiovd:]
.SH DESCRIPTION
.LP
.PP
-\fBipfstat\fP examines /dev/kmem using the symbols \fB_fr_flags\fP,
+\fBipfstat examines /dev/kmem using the symbols \fB_fr_flags\fP,
\fB_frstats\fP, \fB_filterin\fP, and \fB_filterout\fP.
To run and work, it needs to be able to read both /dev/kmem and the
-kernel itself. The kernel name defaults to \fB_PATH_UNIX\fP and then
-to \fB/bsd\fP if \fB_PATH_UNIX\fP isn't defined.
+kernel itself. The kernel name defaults to \fB/vmunix\fP.
.PP
The default behaviour of \fBipfstat\fP
is to retrieve and display the accumulated statistics which have been
@@ -52,7 +49,7 @@ the appropriate list of filter rules currently installed and in use by the
kernel.
.SH FILES
/dev/kmem
-/bsd
+/vmunix
.SH SEE ALSO
ipf(1), ipfstat(1)
.SH BUGS
diff --git a/sbin/ipfstat/kmem.c b/sbin/ipfstat/kmem.c
index 077715dbdb1..28196181bd6 100644
--- a/sbin/ipfstat/kmem.c
+++ b/sbin/ipfstat/kmem.c
@@ -1,5 +1,3 @@
-/* $OpenBSD: kmem.c,v 1.3 1996/06/23 14:30:58 deraadt Exp $ */
-
/*
* (C)opyright 1993,1994,1995 by Darren Reed.
*
@@ -23,6 +21,7 @@
#ifndef lint
static char sccsid[] = "@(#)kmem.c 1.4 1/12/96 (C) 1992 Darren Reed";
+static char rcsid[] = "$Id: kmem.c,v 1.4 1996/07/18 05:08:10 dm Exp $";
#endif
static int kmemfd = -1;
diff --git a/sbin/ipfstat/kmem.h b/sbin/ipfstat/kmem.h
index 413f6df30d3..fad02f30aa6 100644
--- a/sbin/ipfstat/kmem.h
+++ b/sbin/ipfstat/kmem.h
@@ -1,11 +1,10 @@
-/* $OpenBSD: kmem.h,v 1.2 1996/06/23 14:30:58 deraadt Exp $ */
-
/*
* (C)opyright 1993,1994,1995 by Darren Reed.
*
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and due credit is given
* to the original author and the contributors.
+ * $Id: kmem.h,v 1.3 1996/07/18 05:08:10 dm Exp $
*/
extern int openkmem();