diff options
author | glebius <glebius@FreeBSD.org> | 2017-02-10 07:22:12 +0000 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-02-10 07:04:32 -0200 |
commit | abb72844124d16a7ad83487bf5f12c49b66e60d5 (patch) | |
tree | d6de71264e438b11eb1d196ca9e0c63eda8e56b4 /contrib/tcpdump/print-pfsync.c | |
parent | 9c520da80579466ed328970249f2a9ea5cb61063 (diff) | |
download | FreeBSD-src-abb72844124d16a7ad83487bf5f12c49b66e60d5.zip FreeBSD-src-abb72844124d16a7ad83487bf5f12c49b66e60d5.tar.gz |
Merge r309649, r313048, r313083, r313104:
tcpdump 4.9.0
(cherry picked from commit ad0c9114e00a9a30168e0c13c17d8f65571aa67f)
Diffstat (limited to 'contrib/tcpdump/print-pfsync.c')
-rw-r--r-- | contrib/tcpdump/print-pfsync.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/contrib/tcpdump/print-pfsync.c b/contrib/tcpdump/print-pfsync.c index eb9aed8..6291333 100644 --- a/contrib/tcpdump/print-pfsync.c +++ b/contrib/tcpdump/print-pfsync.c @@ -33,17 +33,20 @@ #include "config.h" #endif -#include <tcpdump-stdinc.h> - +#ifndef HAVE_NET_PFVAR_H +#error "No pf headers available" +#endif #include <sys/endian.h> #include <net/if.h> -#include <net/pfvar.h> /* XXX */ +#include <net/pfvar.h> #include <net/if_pfsync.h> #define TCPSTATES #include <netinet/tcp_fsm.h> +#include <netdissect-stdinc.h> #include <string.h> +#include "netdissect.h" #include "interface.h" #include "addrtoname.h" @@ -178,7 +181,7 @@ pfsync_print(netdissect_options *ndo, struct pfsync_header *hdr, break; } - if (vflag) + if (ndo->ndo_vflag) actions[subh->action].print(ndo, bp); bp += alen; @@ -234,7 +237,7 @@ pfsync_print_upd_c(netdissect_options *ndo, const void *bp) ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x", (uintmax_t)be64toh(u->id), ntohl(u->creatorid))); - if (vflag > 2) { + if (ndo->ndo_vflag > 2) { ND_PRINT((ndo, "\n\tTCP? :")); print_src_dst(ndo, &u->src, &u->dst, IPPROTO_TCP); } @@ -343,7 +346,7 @@ print_src_dst(netdissect_options *ndo, const struct pfsync_state_peer *src, else ND_PRINT((ndo, " <BAD STATE LEVELS %u:%u>", src->state, dst->state)); - if (vflag > 1) { + if (ndo->ndo_vflag > 1) { ND_PRINT((ndo, "\n\t")); print_seq(ndo, src); if (src->wscale && dst->wscale) @@ -417,7 +420,7 @@ print_state(netdissect_options *ndo, struct pfsync_state *s) print_src_dst(ndo, src, dst, s->proto); - if (vflag > 1) { + if (ndo->ndo_vflag > 1) { uint64_t packets[2]; uint64_t bytes[2]; uint32_t creation = ntohl(s->creation); @@ -446,7 +449,7 @@ print_state(netdissect_options *ndo, struct pfsync_state *s) if (s->rule != ntohl(-1)) ND_PRINT((ndo, ", rule %u", ntohl(s->rule))); } - if (vflag > 1) { + if (ndo->ndo_vflag > 1) { uint64_t id; bcopy(&s->id, &id, sizeof(uint64_t)); |