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-nflog.c | |
parent | 8ab5c3a4e75a3ce8da691cd6ca6a9945082827af (diff) | |
download | tcpdump-e2982e7f6f0b624a773ec5a58885ee80fab46d34.tar.gz |
Update ND_PRINT() as a variadic macro
Diffstat (limited to 'print-nflog.c')
-rw-r--r-- | print-nflog.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/print-nflog.c b/print-nflog.c index 622743bf..c7cc47c1 100644 --- a/print-nflog.c +++ b/print-nflog.c @@ -49,21 +49,21 @@ static const struct tok nflog_values[] = { static inline void nflog_hdr_print(netdissect_options *ndo, const nflog_hdr_t *hdr, u_int length) { - ND_PRINT((ndo, "version %d, resource ID %d", hdr->nflog_version, ntohs(hdr->nflog_rid))); + ND_PRINT("version %d, resource ID %d", hdr->nflog_version, ntohs(hdr->nflog_rid)); if (!ndo->ndo_qflag) { - ND_PRINT((ndo,", family %s (%d)", + ND_PRINT(", family %s (%d)", tok2str(nflog_values, "Unknown", hdr->nflog_family), - hdr->nflog_family)); + hdr->nflog_family); } else { - ND_PRINT((ndo,", %s", + ND_PRINT(", %s", tok2str(nflog_values, "Unknown NFLOG (0x%02x)", - hdr->nflog_family))); + hdr->nflog_family)); } - ND_PRINT((ndo, ", length %u: ", length)); + ND_PRINT(", length %u: ", length); } u_int @@ -78,12 +78,12 @@ nflog_if_print(netdissect_options *ndo, u_int length = h->len; if (caplen < sizeof(nflog_hdr_t) || length < sizeof(nflog_hdr_t)) { - ND_PRINT((ndo, "[|nflog]")); + ND_PRINT("[|nflog]"); return h_size; } if (hdr->nflog_version != 0) { - ND_PRINT((ndo, "version %u (unknown)", hdr->nflog_version)); + ND_PRINT("version %u (unknown)", hdr->nflog_version); return h_size; } @@ -98,7 +98,7 @@ nflog_if_print(netdissect_options *ndo, /* We have some data. Do we have enough for the TLV header? */ if (caplen < sizeof(nflog_tlv_t) || length < sizeof(nflog_tlv_t)) { /* No. */ - ND_PRINT((ndo, "[|nflog]")); + ND_PRINT("[|nflog]"); return h_size; } @@ -110,14 +110,14 @@ nflog_if_print(netdissect_options *ndo, /* Is the TLV's length less than the minimum? */ if (size < sizeof(nflog_tlv_t)) { /* Yes. Give up now. */ - ND_PRINT((ndo, "[|nflog]")); + ND_PRINT("[|nflog]"); return h_size; } /* Do we have enough data for the full TLV? */ if (caplen < size || length < size) { /* No. */ - ND_PRINT((ndo, "[|nflog]")); + ND_PRINT("[|nflog]"); return h_size; } |