]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ppi.c
Use more the EXTRACT_U_1() macro (40/n)
[tcpdump] / print-ppi.c
index 72cd1b867fd502b9b5699f1ee669a0f10011aed6..9cd5fc1eab96e8f62e632ea15ad8bef3bbd092a9 100644 (file)
@@ -34,8 +34,8 @@ ppi_header_print(netdissect_options *ndo, const u_char *bp, u_int length)
 
        hdr = (const ppi_header_t *)bp;
 
-       len = EXTRACT_LE_16BITS(&hdr->ppi_len);
-       dlt = EXTRACT_LE_32BITS(&hdr->ppi_dlt);
+       len = EXTRACT_LE_U_2(&hdr->ppi_len);
+       dlt = EXTRACT_LE_U_4(&hdr->ppi_dlt);
        dltname = pcap_datalink_val_to_name(dlt);
 
        if (!ndo->ndo_qflag) {
@@ -68,7 +68,7 @@ ppi_print(netdissect_options *ndo,
        }
 
        hdr = (const ppi_header_t *)p;
-       len = EXTRACT_LE_16BITS(&hdr->ppi_len);
+       len = EXTRACT_LE_U_2(&hdr->ppi_len);
        if (caplen < len) {
                /*
                 * If we don't have the entire PPI header, don't
@@ -81,7 +81,7 @@ ppi_print(netdissect_options *ndo,
                ND_PRINT((ndo, "[|ppi]"));
                return (len);
        }
-       dlt = EXTRACT_LE_32BITS(&hdr->ppi_dlt);
+       dlt = EXTRACT_LE_U_4(&hdr->ppi_dlt);
 
        if (ndo->ndo_eflag)
                ppi_header_print(ndo, p, length);