- /*
- * Some printers want to get back at the ethernet addresses,
- * and/or check that they're not walking off the end of the packet.
- * Rather than pass them all the way down, we set these globals.
- */
- packetp = p;
- snapend = p + caplen;
-
- if (memcmp(rfcllc, p, sizeof(rfcllc))==0) {
- length -= RFC1483LLC_LEN;
- caplen -= RFC1483LLC_LEN;
- bp = (u_short *)p;
- p += RFC1483LLC_LEN;
- ether_type = ntohs(bp[3]);
- } else {
- ether_type = ETHERTYPE_IP;
- bp = (u_short *)p;
- }
-
- /*
- * Is it (gag) an 802.3 encapsulation?
- */
- extracted_ethertype = 0;
- if (ether_type < ETHERMTU) {
- /* Try to print the LLC-layer header & higher layers */
+ if (memcmp(rfcllc, p, sizeof(rfcllc)) == 0) {
+ /*
+ * LLC header is present. Try to print it & higher layers.
+ */