Deleted Added
full compact
88c88
< (void)printf("802.3");
---
> (void)printf("802.2");
145c145
< ether_type = ntohs(sllp->sll_protocol);
---
> ether_type = EXTRACT_16BITS(&sllp->sll_protocol);
146a147
> recurse:
190,196c191,227
< } else if (ether_encap_print(ether_type, p, length, caplen,
< &extracted_ethertype) == 0) {
< /* ether_type not known, print raw packet */
< if (!eflag)
< sll_print(sllp, length + SLL_HDR_LEN);
< if (!suppress_default_print)
< default_print(p, caplen);
---
> } else if (ether_type == ETHERTYPE_8021Q) {
> /*
> * Print VLAN information, and then go back and process
> * the enclosed type field.
> */
> if (caplen < 4 || length < 4) {
> printf("[|vlan]");
> return (SLL_HDR_LEN);
> }
> if (eflag) {
> u_int16_t tag = EXTRACT_16BITS(p);
>
> printf("vlan %u, p %u%s, ",
> tag & 0xfff,
> tag >> 13,
> (tag & 0x1000) ? ", CFI" : "");
> }
>
> ether_type = EXTRACT_16BITS(p + 2);
> if (ether_type <= ETHERMTU)
> ether_type = LINUX_SLL_P_802_2;
> if (!qflag) {
> (void)printf("ethertype %s, ",
> tok2str(ethertype_values, "Unknown", ether_type));
> }
> p += 4;
> length -= 4;
> caplen -= 4;
> goto recurse;
> } else {
> if (ethertype_print(ether_type, p, length, caplen) == 0) {
> /* ether_type not known, print raw packet */
> if (!eflag)
> sll_print(sllp, length + SLL_HDR_LEN);
> if (!suppress_default_print)
> default_print(p, caplen);
> }