summaryrefslogtreecommitdiff
path: root/usr.sbin/tcpdump
diff options
context:
space:
mode:
authorRyan Thomas McBride <mcbride@cvs.openbsd.org>2005-11-04 08:24:16 +0000
committerRyan Thomas McBride <mcbride@cvs.openbsd.org>2005-11-04 08:24:16 +0000
commit5e41b39a3485941001cdb7a8ee3a81d20df276a0 (patch)
treebaced972cdcecf1063ebb47902c6c9e8c1b18445 /usr.sbin/tcpdump
parent086343e525726acfced4e03c5abe185e9af29eb6 (diff)
crank pf_state and pf_src_node byte and packet counters to u_in64_t, since
we're breaking pfsync compatibility this cycle anyways. Requested by djm@, ok henning@, 'wheee!' deraadt@
Diffstat (limited to 'usr.sbin/tcpdump')
-rw-r--r--usr.sbin/tcpdump/pf_print_state.c4
-rw-r--r--usr.sbin/tcpdump/print-pfsync.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/tcpdump/pf_print_state.c b/usr.sbin/tcpdump/pf_print_state.c
index 59bab3fdb2a..fc575aba1ab 100644
--- a/usr.sbin/tcpdump/pf_print_state.c
+++ b/usr.sbin/tcpdump/pf_print_state.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_print_state.c,v 1.2 2004/02/10 20:26:49 mcbride Exp $ */
+/* $OpenBSD: pf_print_state.c,v 1.3 2005/11/04 08:24:15 mcbride Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -250,7 +250,7 @@ print_state(struct pf_state *s, int opts)
min = s->expire % 60;
s->expire /= 60;
printf(", expires in %.2u:%.2u:%.2u", s->expire, min, sec);
- printf(", %u:%u pkts, %u:%u bytes",
+ printf(", %llu:%llu pkts, %llu:%llu bytes",
s->packets[0], s->packets[1], s->bytes[0], s->bytes[1]);
if (s->anchor.nr != -1)
printf(", anchor %u", s->anchor.nr);
diff --git a/usr.sbin/tcpdump/print-pfsync.c b/usr.sbin/tcpdump/print-pfsync.c
index d4dcf061f9b..fd8b0962b71 100644
--- a/usr.sbin/tcpdump/print-pfsync.c
+++ b/usr.sbin/tcpdump/print-pfsync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-pfsync.c,v 1.28 2005/05/28 15:10:07 ho Exp $ */
+/* $OpenBSD: print-pfsync.c,v 1.29 2005/11/04 08:24:15 mcbride Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -28,7 +28,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-pfsync.c,v 1.28 2005/05/28 15:10:07 ho Exp $";
+ "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-pfsync.c,v 1.29 2005/11/04 08:24:15 mcbride Exp $";
#endif
#include <sys/param.h>
@@ -165,10 +165,10 @@ pfsync_print(struct pfsync_header *hdr, int len)
bcopy(&s->rt_addr, &st.rt_addr, sizeof(st.rt_addr));
st.creation = ntohl(s->creation);
st.expire = ntohl(s->expire);
- st.packets[0] = ntohl(s->packets[0]);
- st.packets[1] = ntohl(s->packets[1]);
- st.bytes[0] = ntohl(s->bytes[0]);
- st.bytes[1] = ntohl(s->bytes[1]);
+ pf_state_counter_ntoh(s->packets[0], st.packets[0]);
+ pf_state_counter_ntoh(s->packets[1], st.packets[1]);
+ pf_state_counter_ntoh(s->bytes[0], st.bytes[0]);
+ pf_state_counter_ntoh(s->bytes[1], st.bytes[1]);
st.creatorid = s->creatorid;
st.af = s->af;
st.proto = s->proto;