diff options
author | sam <sam@FreeBSD.org> | 2005-05-29 18:17:16 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-05-29 18:17:16 +0000 |
commit | 777fc78fe5d7142db2a7e4b9fc3ad2f082e02446 (patch) | |
tree | 00ad2d6dd16ad34ea9cdf4e6521ac3fe7179a0f3 /contrib/tcpdump/print-pflog.c | |
parent | 8c6500f369940b5e6f664368df8ecb0ac8e346d7 (diff) | |
parent | 88a191f109e4bbf287e317e4115185aa904a7757 (diff) | |
download | FreeBSD-src-777fc78fe5d7142db2a7e4b9fc3ad2f082e02446.zip FreeBSD-src-777fc78fe5d7142db2a7e4b9fc3ad2f082e02446.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r146773,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/tcpdump/print-pflog.c')
-rw-r--r-- | contrib/tcpdump/print-pflog.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/contrib/tcpdump/print-pflog.c b/contrib/tcpdump/print-pflog.c index 24634b2..f8b18a9 100644 --- a/contrib/tcpdump/print-pflog.c +++ b/contrib/tcpdump/print-pflog.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-pflog.c,v 1.7.2.4 2004/03/29 21:56:26 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-pflog.c,v 1.13 2005/04/06 21:32:41 mcr Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -75,11 +75,14 @@ static struct tok pf_directions[] = { static void pflog_print(const struct pfloghdr *hdr) { - if (ntohl(hdr->subrulenr) == (u_int32_t)-1) - printf("rule %u/", ntohl(hdr->rulenr)); + u_int32_t rulenr, subrulenr; + + rulenr = ntohl(hdr->rulenr); + subrulenr = ntohl(hdr->subrulenr); + if (subrulenr == (u_int32_t)-1) + printf("rule %u/", rulenr); else - printf("rule %u.%s.%u/", ntohl(hdr->rulenr), hdr->ruleset, - ntohl(hdr->subrulenr)); + printf("rule %u.%s.%u/", rulenr, hdr->ruleset, subrulenr); printf("%s: %s %s on %s: ", tok2str(pf_reasons, "unkn(%u)", hdr->reason), @@ -133,7 +136,7 @@ pflog_if_print(const struct pcap_pkthdr *h, register const u_char *p) #if OPENBSD_AF_INET != AF_INET case OPENBSD_AF_INET: /* XXX: read pcap files */ #endif - ip_print(p, length); + ip_print(gndo, p, length); break; #ifdef INET6 @@ -158,3 +161,10 @@ trunc: printf("[|pflog]"); return (hdrlen); } + +/* + * Local Variables: + * c-style: whitesmith + * c-basic-offset: 8 + * End: + */ |