summaryrefslogtreecommitdiffstats
path: root/contrib/pf/pfctl/pf_print_state.c
diff options
context:
space:
mode:
authormlaier <mlaier@FreeBSD.org>2004-06-16 23:39:33 +0000
committermlaier <mlaier@FreeBSD.org>2004-06-16 23:39:33 +0000
commitf60cf9b58b8456f06fbe5d6619f1b317c6f8020e (patch)
treef5ef8788feb494dffb0267e964fb6ac0d1e2cbfa /contrib/pf/pfctl/pf_print_state.c
parenta5725614a74c5e7e57dee0cda1a81ab91810a418 (diff)
downloadFreeBSD-src-f60cf9b58b8456f06fbe5d6619f1b317c6f8020e.zip
FreeBSD-src-f60cf9b58b8456f06fbe5d6619f1b317c6f8020e.tar.gz
Commit userland part of pf version 3.5 from OpenBSD (OPENBSD_3_5_BASE).
Diffstat (limited to 'contrib/pf/pfctl/pf_print_state.c')
-rw-r--r--contrib/pf/pfctl/pf_print_state.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/pf/pfctl/pf_print_state.c b/contrib/pf/pfctl/pf_print_state.c
index b7cf5ca..318bde7 100644
--- a/contrib/pf/pfctl/pf_print_state.c
+++ b/contrib/pf/pfctl/pf_print_state.c
@@ -30,8 +30,12 @@
*
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include <sys/types.h>
#include <sys/socket.h>
+#include <sys/endian.h>
#include <net/if.h>
#define TCPSTATES
#include <netinet/tcp_fsm.h>
@@ -284,8 +288,13 @@ print_state(struct pf_state *s, int opts)
printf("\n");
}
if (opts & PF_OPT_VERBOSE2) {
+#ifdef __FreeBSD__
+ printf(" id: %016llx creatorid: %08x\n",
+ (long long)be64toh(s->id), ntohl(s->creatorid));
+#else
printf(" id: %016llx creatorid: %08x\n",
betoh64(s->id), ntohl(s->creatorid));
+#endif
}
}
OpenPOWER on IntegriCloud