diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2018-01-07 11:47:30 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2018-01-07 13:36:41 +0100 |
commit | e2982e7f6f0b624a773ec5a58885ee80fab46d34 (patch) | |
tree | 52c8e511ccaff8ef09dc3337b213273865522162 /print-pflog.c | |
parent | 8ab5c3a4e75a3ce8da691cd6ca6a9945082827af (diff) | |
download | tcpdump-e2982e7f6f0b624a773ec5a58885ee80fab46d34.tar.gz |
Update ND_PRINT() as a variadic macro
Diffstat (limited to 'print-pflog.c')
-rw-r--r-- | print-pflog.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/print-pflog.c b/print-pflog.c index 084b314b..94164e98 100644 --- a/print-pflog.c +++ b/print-pflog.c @@ -93,15 +93,15 @@ pflog_print(netdissect_options *ndo, const struct pfloghdr *hdr) rulenr = EXTRACT_BE_U_4(&hdr->rulenr); subrulenr = EXTRACT_BE_U_4(&hdr->subrulenr); if (subrulenr == (uint32_t)-1) - ND_PRINT((ndo, "rule %u/", rulenr)); + ND_PRINT("rule %u/", rulenr); else - ND_PRINT((ndo, "rule %u.%s.%u/", rulenr, hdr->ruleset, subrulenr)); + ND_PRINT("rule %u.%s.%u/", rulenr, hdr->ruleset, subrulenr); - ND_PRINT((ndo, "%s: %s %s on %s: ", + ND_PRINT("%s: %s %s on %s: ", tok2str(pf_reasons, "unkn(%u)", EXTRACT_U_1(&hdr->reason)), tok2str(pf_actions, "unkn(%u)", EXTRACT_U_1(&hdr->action)), tok2str(pf_directions, "unkn(%u)", EXTRACT_U_1(&hdr->dir)), - hdr->ifname)); + hdr->ifname); } u_int @@ -116,20 +116,20 @@ pflog_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, /* check length */ if (caplen < sizeof(uint8_t)) { - ND_PRINT((ndo, "%s", tstr)); + ND_PRINT("%s", tstr); return (caplen); } #define MIN_PFLOG_HDRLEN 45 hdr = (const struct pfloghdr *)p; if (hdr->length < MIN_PFLOG_HDRLEN) { - ND_PRINT((ndo, "[pflog: invalid header length!]")); + ND_PRINT("[pflog: invalid header length!]"); return (hdr->length); /* XXX: not really */ } hdrlen = BPF_WORDALIGN(hdr->length); if (caplen < hdrlen) { - ND_PRINT((ndo, "%s", tstr)); + ND_PRINT("%s", tstr); return (hdrlen); /* XXX: true? */ } @@ -173,7 +173,7 @@ pflog_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, return (hdrlen); trunc: - ND_PRINT((ndo, "%s", tstr)); + ND_PRINT("%s", tstr); return (hdrlen); } |