aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Angelo Daros de Luca <luizluca@gmail.com>2022-01-06 15:51:54 -0300
committerLuiz Angelo Daros de Luca <luizluca@gmail.com>2022-03-07 00:43:19 -0300
commitb2be2cd3c115da1e7cf5c33b3c4f61acac7a7efc (patch)
treea58a1b5a7e383eefa92dad20788b4f2ba59a0f19
parent5f634cf36c652235f63b0de0fee044d0871686f8 (diff)
Add support for Realtek (Ethertype) DSA data
Realtek switchtag rtl4a (4 bytes long, protocol 0xA) and rtl8_4 (8 bytes long, protocol 0x04) are Ethertype DSA tags, inserted in the Ethernet header similar to an 802.1Q tag. Both shares the same Ethertype 0x8899 as other Realtek proprietary protocols. Realtek switchtag rtl8_4t is identical to rtl8_4 but positioned before the CRC, at the end of the Ethernet frame.
-rw-r--r--pcap-linux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pcap-linux.c b/pcap-linux.c
index e931f84f..7bfa36f9 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -5048,6 +5048,9 @@ static struct dsa_proto {
{ "brcm-prepend", DLT_DSA_TAG_BRCM_PREPEND },
{ "dsa", DLT_DSA_TAG_DSA },
{ "edsa", DLT_DSA_TAG_EDSA },
+ { "rtl4a", DLT_EN10MB },
+ { "rtl8_4", DLT_EN10MB },
+ { "rtl8_4t", DLT_EN10MB },
};
static int