+ length_type = GET_BE_U_2(bp + (hdrlen - sizeof(ehp->ether_length_type)));
+ if (length_type <= MAX_ETHERNET_LENGTH_VAL) {
+ /*
+ * It's a length field.
+ */
+ ND_PRINT(", 802.3, length %u", length_type);
+ if (length_type > length - hdrlen)
+ ND_PRINT(" (too large, > %u)", length - hdrlen);
+ ND_PRINT(": ");
+ } else {
+ /*
+ * It's a type field.
+ */
+ if (!ndo->ndo_qflag)
+ ND_PRINT(", ethertype %s (0x%04x), length %u: ",
+ tok2str(ethertype_values,"Unknown", length_type),
+ length_type, length);
+ else
+ ND_PRINT(", %s, length %u: ",
+ tok2str(ethertype_values,"Unknown Ethertype (0x%04x)", length_type),
+ length);
+ }