uint16_t fc;
u_int caplen, hdrlen, meshdrlen;
const uint8_t *src, *dst;
- u_short extracted_ethertype;
+ int llc_hdrlen;
caplen = orig_caplen;
/* Remove FCS, if present */
}
} else {
get_data_src_dst_mac(fc, p - hdrlen, &src, &dst);
- if (llc_print(ndo, p, length, caplen, dst, src,
- &extracted_ethertype) == 0) {
+ llc_hdrlen = llc_print(ndo, p, length, caplen, dst, src);
+ if (llc_hdrlen < 0) {
/*
* Some kinds of LLC packet we cannot
* handle intelligently
*/
- if (!ndo->ndo_eflag) {
- ieee_802_11_hdr_print(ndo, fc, p - hdrlen,
- hdrlen, meshdrlen);
- }
- if (extracted_ethertype)
- ND_PRINT((ndo, "(LLC %s) ",
- etherproto_string(
- htons(extracted_ethertype))));
if (!ndo->ndo_suppress_default_print)
ND_DEFAULTPRINT(p, caplen);
+ llc_hdrlen = -llc_hdrlen;
}
+ hdrlen += llc_hdrlen;
}
break;
default: