summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2012-09-19 13:50:36 +0000
committermikeb <mikeb@openbsd.org>2012-09-19 13:50:36 +0000
commitb4d75d3a55fc3b543797198624135192d00bb589 (patch)
treee212bf8b2bee3e38daa76779366046d76979f92a
parentupdate the tdb replay counter endian conversion to 64 bits; (diff)
downloadwireguard-openbsd-b4d75d3a55fc3b543797198624135192d00bb589.tar.xz
wireguard-openbsd-b4d75d3a55fc3b543797198624135192d00bb589.zip
replay counter was bumped a while ago, update byte order conversion;
while here, improve the way information is printed out a bit. with input and ok camield, mpf
-rw-r--r--usr.sbin/tcpdump/print-pfsync.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.sbin/tcpdump/print-pfsync.c b/usr.sbin/tcpdump/print-pfsync.c
index 418292018e0..0bb8ca791bb 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.37 2009/11/09 09:54:16 dlg Exp $ */
+/* $OpenBSD: print-pfsync.c,v 1.38 2012/09/19 13:50:36 mikeb Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -131,10 +131,11 @@ struct pfsync_actions actions[] = {
{ 0, NULL },
{ 0, NULL },
{ sizeof(struct pfsync_bus), pfsync_print_bus },
- { sizeof(struct pfsync_tdb), pfsync_print_tdb },
+ { 0, NULL },
{ 0, pfsync_print_eof },
{ sizeof(struct pfsync_state), pfsync_print_state },
- { sizeof(struct pfsync_state), pfsync_print_state }
+ { sizeof(struct pfsync_state), pfsync_print_state },
+ { sizeof(struct pfsync_tdb), pfsync_print_tdb },
};
void
@@ -312,8 +313,8 @@ pfsync_print_tdb(int flags, const void *bp)
{
const struct pfsync_tdb *t = bp;
- printf("\n\tspi: %08x rpl: %u cur_bytes: %llu",
- htonl(t->spi), htonl(t->rpl), betoh64(t->cur_bytes));
+ printf("\n\tspi: 0x%08x rpl: %llu cur_bytes: %llu",
+ ntohl(t->spi), betoh64(t->rpl), betoh64(t->cur_bytes));
return (0);
}