summaryrefslogtreecommitdiff
path: root/print-sll.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-11-12 22:56:24 -0800
committerGuy Harris <guy@alum.mit.edu>2018-11-12 22:56:24 -0800
commit9edeb142527f29a6e31425b4280c9be0a7962c47 (patch)
treeebe5a1a013aacba13765a78d910d4ee9d1f036b8 /print-sll.c
parent83e419c6289a395a0443f2dac24bb004e839f202 (diff)
downloadtcpdump-9edeb142527f29a6e31425b4280c9be0a7962c47.tar.gz
Handle radiotap+802.11 for DLT_LINUX_SLL2 as well.
Diffstat (limited to 'print-sll.c')
-rw-r--r--print-sll.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/print-sll.c b/print-sll.c
index 1ce25259..e87bd032 100644
--- a/print-sll.c
+++ b/print-sll.c
@@ -404,6 +404,7 @@ sll2_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char
u_int caplen = h->caplen;
u_int length = h->len;
const struct sll2_header *sllp;
+ u_short hatype;
u_short ether_type;
int llc_hdrlen;
u_int hdrlen;
@@ -443,6 +444,16 @@ sll2_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char
p += SLL2_HDR_LEN;
hdrlen = SLL2_HDR_LEN;
+ hatype = EXTRACT_BE_U_2(sllp->sll2_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_BE_U_2(sllp->sll2_protocol);
recurse: