]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-nflog.c
Update ND_PRINT() as a variadic macro
[tcpdump] / print-nflog.c
index 622743bfa80a26c5d80a33bce0db96ae4258c2f1..c7cc47c124bb238ba89b3ef9ed720b63c6cd0dce 100644 (file)
@@ -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;
                }