X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/49b23c5a9b0198bb382dcf43c458d46fcf2fa809..6c8ef0eb86a39c277d1a43802dd8ea01b51cfb2a:/print-sll.c diff --git a/print-sll.c b/print-sll.c index 0cbc3c93..9bc5d201 100644 --- a/print-sll.c +++ b/print-sll.c @@ -198,6 +198,7 @@ sll_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char u_int caplen = h->caplen; u_int length = h->len; register const struct sll_header *sllp; + u_short hatype; u_short ether_type; int llc_hdrlen; u_int hdrlen; @@ -225,6 +226,16 @@ sll_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char p += SLL_HDR_LEN; hdrlen = SLL_HDR_LEN; + hatype = EXTRACT_16BITS(&sllp->sll_hatype); + switch (hatype) { + + case 803: + /* + * This is an packet with a radiotap header; + * just dissect the payload as such. + */ + return (SLL_HDR_LEN + ieee802_11_radio_print(ndo, p, length, caplen)); + } ether_type = EXTRACT_16BITS(&sllp->sll_protocol); recurse: @@ -297,7 +308,7 @@ recurse: hdrlen += 4; goto recurse; } else { - if (ethertype_print(ndo, ether_type, p, length, caplen) == 0) { + if (ethertype_print(ndo, ether_type, p, length, caplen, NULL, NULL) == 0) { /* ether_type not known, print raw packet */ if (!ndo->ndo_eflag) sll_print(ndo, sllp, length + SLL_HDR_LEN);