]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-esp.c
Update ND_PRINT() as a variadic macro
[tcpdump] / print-esp.c
index 4de04c4af76ecd9f250e6471311f7a5c845bd613..7013a0c5e55e44f4dfca116375280d58503a960c 100644 (file)
@@ -681,12 +681,12 @@ esp_print(netdissect_options *ndo,
        ep = ndo->ndo_snapend;
 
        if ((const u_char *)(esp + 1) >= ep) {
-               ND_PRINT((ndo, "[|ESP]"));
+               ND_PRINT("[|ESP]");
                goto fail;
        }
-       ND_PRINT((ndo, "ESP(spi=0x%08x", EXTRACT_BE_U_4(esp->esp_spi)));
-       ND_PRINT((ndo, ",seq=0x%x)", EXTRACT_BE_U_4(esp->esp_seq)));
-       ND_PRINT((ndo, ", length %u", length));
+       ND_PRINT("ESP(spi=0x%08x", EXTRACT_BE_U_4(esp->esp_spi));
+       ND_PRINT(",seq=0x%x)", EXTRACT_BE_U_4(esp->esp_seq));
+       ND_PRINT(", length %u", length);
 
 #ifndef HAVE_LIBCRYPTO
        goto fail;
@@ -817,7 +817,7 @@ esp_print(netdissect_options *ndo,
        if (nhdr)
                *nhdr = EXTRACT_U_1(ep - 1);
 
-       ND_PRINT((ndo, ": "));
+       ND_PRINT(": ");
        return advance;
 #endif