summaryrefslogtreecommitdiff
path: root/sbin/ipfstat
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/ipfstat')
-rw-r--r--sbin/ipfstat/Makefile4
-rw-r--r--sbin/ipfstat/fils.c35
-rw-r--r--sbin/ipfstat/ipfstat.814
-rw-r--r--sbin/ipfstat/kmem.h14
4 files changed, 46 insertions, 21 deletions
diff --git a/sbin/ipfstat/Makefile b/sbin/ipfstat/Makefile
index 17997b5c6d8..3577bfaa03c 100644
--- a/sbin/ipfstat/Makefile
+++ b/sbin/ipfstat/Makefile
@@ -1,10 +1,10 @@
-# $OpenBSD: Makefile,v 1.3 1996/06/23 14:30:56 deraadt Exp $
+# $OpenBSD: Makefile,v 1.4 1998/09/15 09:58:33 pattonme Exp $
PROG= ipfstat
MAN= ipfstat.8
SRCS= fils.c parse.c opt.c kmem.c
.PATH: ${.CURDIR}/../../sbin/ipf
-CFLAGS+=-DIPL_NAME=\"/dev/ipl\" -I${.CURDIR}/../../sbin/ipf -I${.CURDIR}/../../sys/netinet
+CFLAGS+=-I${.CURDIR}/../../sbin/ipf
diff --git a/sbin/ipfstat/fils.c b/sbin/ipfstat/fils.c
index b28c360be53..cda5939e3a1 100644
--- a/sbin/ipfstat/fils.c
+++ b/sbin/ipfstat/fils.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fils.c,v 1.12 1998/01/26 04:13:41 dgregor Exp $ */
+/* $OpenBSD: fils.c,v 1.13 1998/09/15 09:58:34 pattonme Exp $ */
/*
* Copyright (C) 1993-1997 by Darren Reed.
*
@@ -32,27 +32,31 @@
#include <arpa/nameser.h>
#include <resolv.h>
#include <netinet/tcp.h>
-#include "ip_fil_compat.h"
-#include "ip_fil.h"
+#if defined(__OpenBSD__)
+# include <netinet/ip_fil_compat.h>
+#else
+# include <netinet/ip_compat.h>
+#endif
+#include <netinet/ip_fil.h>
#include "ipf.h"
-#include "ip_proxy.h"
-#include "ip_nat.h"
-#include "ip_frag.h"
-#include "ip_state.h"
-#include "ip_auth.h"
+#include <netinet/ip_proxy.h>
+#include <netinet/ip_nat.h>
+#include <netinet/ip_frag.h>
+#include <netinet/ip_state.h>
+#include <netinet/ip_auth.h>
#include "kmem.h"
#if defined(__NetBSD__) || (__OpenBSD__)
-#include <paths.h>
+# include <paths.h>
#endif
#if !defined(lint)
static const char sccsid[] = "@(#)fils.c 1.21 4/20/96 (C) 1993-1996 Darren Reed";
-static const char rcsid[] = "@(#)$Id: fils.c,v 1.12 1998/01/26 04:13:41 dgregor Exp $";
+static const char rcsid[] = "@(#)$Id: fils.c,v 1.13 1998/09/15 09:58:34 pattonme Exp $";
#endif
#ifdef _PATH_UNIX
-#define VMUNIX _PATH_UNIX
+# define VMUNIX _PATH_UNIX
#else
-#define VMUNIX "/vmunix"
+# define VMUNIX "/vmunix"
#endif
extern char *optarg;
@@ -447,6 +451,13 @@ ips_stat_t *ipsp;
PRINTF("\n");
/* ... phil@ultimate.com */
+ PRINTF("\tpkt_flags & %x = %x,\t", ips.is_flags & 0xf,
+ ips.is_flags >> 4);
+ PRINTF("\tpkt_options & %x = %x\n", ips.is_optmsk,
+ ips.is_opt);
+ PRINTF("\tpkt_security & %x = %x, pkt_auth & %x = %x\n",
+ ips.is_secmsk, ips.is_sec, ips.is_authmsk,
+ ips.is_auth);
istab[i] = ips.is_next;
}
}
diff --git a/sbin/ipfstat/ipfstat.8 b/sbin/ipfstat/ipfstat.8
index afd138ec7f0..900b5976958 100644
--- a/sbin/ipfstat/ipfstat.8
+++ b/sbin/ipfstat/ipfstat.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ipfstat.8,v 1.9 1998/05/18 03:36:46 art Exp $
+.\" $OpenBSD: ipfstat.8,v 1.10 1998/09/15 09:58:34 pattonme Exp $
.TH ipfstat 8
.SH NAME
ipfstat \- reports on packet filter statistics and filter list
@@ -70,8 +70,14 @@ kernel.
.SH FILES
/dev/kmem
.br
-/vmunix
+/dev/ipl
+.br
+/dev/ipstate
+.br
+/bsd
.SH SEE ALSO
-ipf(1), ipfstat(1)
+ipf(1), ipftest(1), ipnat(1), ipf(4), ipl(4), ipnat(4), ipf(5), ipnat(5), ipmon(8)
+.br
+http://coombs.anu.edu.au/ipfilter/
.SH BUGS
-none known.
+If you find any, please send email to me at darrenr@pobox.com.
diff --git a/sbin/ipfstat/kmem.h b/sbin/ipfstat/kmem.h
index 28e9a9d643c..b0733126362 100644
--- a/sbin/ipfstat/kmem.h
+++ b/sbin/ipfstat/kmem.h
@@ -1,11 +1,11 @@
-/* $OpenBSD: kmem.h,v 1.5 1998/01/26 04:13:44 dgregor Exp $ */
+/* $OpenBSD: kmem.h,v 1.6 1998/09/15 09:58:34 pattonme Exp $ */
/*
* Copyright (C) 1993-1997 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.5 1998/01/26 04:13:44 dgregor Exp $
+ * $Id: kmem.h,v 1.6 1998/09/15 09:58:34 pattonme Exp $
*/
#ifndef __KMEM_H__
@@ -21,6 +21,14 @@
extern int openkmem __P((void));
extern int kmemcpy __P((char *, long, int));
-#define KMEM "/dev/kmem"
+#if defined(__NetBSD__) || defined(__OpenBSD)
+# include <paths.h>
+#endif
+
+#ifdef _PATH_KMEM
+# define KMEM _PATH_KMEM
+#else
+# define KMEM "/dev/kmem"
+#endif
#endif /* __KMEM_H__ */