+
+ hdr = (const ppi_header_t *)p;
+ len = GET_LE_U_2(hdr->ppi_len);
+ if (len < sizeof(ppi_header_t) || len > 65532) {
+ /* It MUST be between 8 and 65,532 inclusive (spec 3.1.3) */
+ ND_PRINT(" [length %u < %zu or > 65532]", len,
+ sizeof(ppi_header_t));
+ nd_print_invalid(ndo);
+ ndo->ndo_ll_hdr_len += caplen;
+ return;
+ }
+ if (caplen < len) {
+ /*
+ * If we don't have the entire PPI header, don't
+ * bother.
+ */
+ nd_print_trunc(ndo);
+ ndo->ndo_ll_hdr_len += caplen;
+ return;
+ }
+ dlt = GET_LE_U_4(hdr->ppi_dlt);