summaryrefslogtreecommitdiff
path: root/sysutils/pfstat/files/patch-pf.c
diff options
context:
space:
mode:
authorShaun Amott <shaun@FreeBSD.org>2006-07-24 14:51:48 +0000
committerShaun Amott <shaun@FreeBSD.org>2006-07-24 14:51:48 +0000
commit5584b29a087c1eccc4cb75c060a848f059a1fab7 (patch)
tree1fd4d1eb1055369ca114cbe03695b5f89a3e86c9 /sysutils/pfstat/files/patch-pf.c
parent- Remove bad sites. (diff)
- Upgrade to 2.2 [1]
- Remove dead graphics/gd1 dependency - portlint(1) tweaks Submitted by: Fabian Keil <freebsd-listen@fabiankeil.de> [1] Approved by: mlaier (maintainer, via IRC)
Notes
Notes: svn path=/head/; revision=168632
Diffstat (limited to 'sysutils/pfstat/files/patch-pf.c')
-rw-r--r--sysutils/pfstat/files/patch-pf.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/sysutils/pfstat/files/patch-pf.c b/sysutils/pfstat/files/patch-pf.c
new file mode 100644
index 000000000000..71e897e8d49a
--- /dev/null
+++ b/sysutils/pfstat/files/patch-pf.c
@@ -0,0 +1,31 @@
+--- pf.c.orig Thu May 11 23:41:07 2006
++++ pf.c Fri Jul 7 21:49:20 2006
+@@ -144,23 +144,24 @@
+ query_ifaces(int fd, void (*cb)(int, const char *, int, double))
+ {
+ struct pfioc_iface io;
+- struct pfi_kif ifs[256];
++ struct pfi_if ifs[256];
+ int i, j;
+
+ memset(&io, 0, sizeof(io));
+ io.pfiio_buffer = ifs;
+ io.pfiio_esize = sizeof(ifs[0]);
+ io.pfiio_size = sizeof(ifs) / sizeof(ifs[0]);
++ io.pfiio_flags = PFI_FLAG_ALLMASK;
+ if (ioctl(fd, DIOCIGETIFACES, &io)) {
+ fprintf(stderr, "ioctl: DIOCIGETIFACES: %s\n", strerror(errno));
+ return (1);
+ }
+ for (i = 0; i < io.pfiio_size; ++i)
+ for (j = 0; j < 16; ++j)
+- (*cb)(COL_TYPE_IFACE, ifs[i].pfik_name,
++ (*cb)(COL_TYPE_IFACE, ifs[i].pfif_name,
+ j, j & 4 ?
+- ifs[i].pfik_packets[j&1?0:1][j&2?0:1][j&8?0:1] :
+- ifs[i].pfik_bytes[j&1?0:1][j&2?0:1][j&8?0:1]);
++ ifs[i].pfif_packets[j&1?0:1][j&2?0:1][j&8?0:1] :
++ ifs[i].pfif_bytes[j&1?0:1][j&2?0:1][j&8?0:1]);
+ /* bytes/packets[af][dir][op] */
+ return (0);
+ }