- proto = EXTRACT_16BITS(&p[2]);
- if (eflag) {
- printf("%s, ethertype %s (0x%04x), length %u: ",
- tok2str(chdlc_cast_values, "0x%02x", p[0]),
+ ndo->ndo_protocol = "chdlc";
+ ND_ICHECK_U(length, <, CHDLC_HDRLEN);
+ proto = GET_BE_U_2(p + 2);
+ if (ndo->ndo_eflag) {
+ ND_PRINT("%s, ethertype %s (0x%04x), length %u: ",
+ tok2str(chdlc_cast_values, "0x%02x", GET_U_1(p)),