summaryrefslogtreecommitdiff
path: root/print.c
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2019-01-18 15:24:33 -0800
committerFlorian Fainelli <f.fainelli@gmail.com>2019-01-28 10:56:18 -0800
commit6eaebfe99288e7a24188bf2d3771865ff702af43 (patch)
tree4f719c7bf7d71e4a2d8ee89db74cdf58275e6394 /print.c
parent48e290d807a535cdda391eef7e6992c3429c986a (diff)
downloadtcpdump-6eaebfe99288e7a24188bf2d3771865ff702af43.tar.gz
Add support for decoding Broadcom Ethernet switches tags
This adds support for decoding the Broadcom Ethernet switches tags which are are 4byte in length and are located between the Ethernet MAC SA and the Type/Length field (DSA_TAG_BRCM) as well as the pre-pended Broadcom tag (DSA_TAG_BRCM_PREPEND) which are located in front of the standard Ethernet header. This makes use of the recently introduced ether_print_hdr_len() to allow specifying the non-standard Ethernet header length of 12 + 4 + 2 bytes.
Diffstat (limited to 'print.c')
-rw-r--r--print.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/print.c b/print.c
index 48374544..9ee88eb1 100644
--- a/print.c
+++ b/print.c
@@ -224,6 +224,12 @@ static const struct printer printers[] = {
#ifdef DLT_PPP_SERIAL
{ ppp_hdlc_if_print, DLT_PPP_SERIAL },
#endif
+#ifdef DLT_DSA_TAG_BRCM
+ { brcm_tag_if_print, DLT_DSA_TAG_BRCM },
+#endif
+#ifdef DLT_DSA_TAG_BRCM_PREPEND
+ { brcm_tag_prepend_if_print, DLT_DSA_TAG_BRCM_PREPEND },
+#endif
{ NULL, 0 },
};