]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Add Broadcom tags tests 728/head
authorFlorian Fainelli <[email protected]>
Sat, 26 Jan 2019 00:58:42 +0000 (16:58 -0800)
committerFlorian Fainelli <[email protected]>
Mon, 28 Jan 2019 18:56:18 +0000 (10:56 -0800)
Add 3 tests to test that we can properly dissect Broadcom tags. Two are
for DSA_TAG_BRCM where the tag is between Ethernet MAC SA and
Type/Length and one for DSA_TAG_BRCM_PREPEND where the tag is
encapsulating the Ethernet frame (thus requires -e to be shown).

tests/TESTLIST
tests/brcm-tag-e.out [new file with mode: 0644]
tests/brcm-tag-prepend.out [new file with mode: 0644]
tests/brcm-tag-prepend.pcap [new file with mode: 0644]
tests/brcm-tag.out [new file with mode: 0644]
tests/brcm-tag.pcap [new file with mode: 0644]

index f544472d11316eaa25011707865f5b637a9dbd03..dcced513df0be9b7da62040e2845592e03a8fc88 100644 (file)
@@ -28,6 +28,11 @@ bgp-large-community bgp-large-community.pcap bgp-large-community.out -v
 bgp-shutdown-communication bgp-shutdown-communication.pcapng bgp-shutdown-communication.out -v
 bgp-addpath bgp-addpath.pcap bgp-addpath.out -v
 
+# Broadcom tag tests
+brcmtag                brcm-tag.pcap           brcm-tag.out
+brcmtag-e      brcm-tag.pcap           brcm-tag-e.out  -e
+brcmtagprepend brcm-tag-prepend.pcap   brcm-tag-prepend.out -e
+
 # EAP tests
 eapon1         eapon1.pcap             eapon1.out
 
diff --git a/tests/brcm-tag-e.out b/tests/brcm-tag-e.out
new file mode 100644 (file)
index 0000000..34e5d58
--- /dev/null
@@ -0,0 +1,23 @@
+    1  02:10:20.634030 00:10:18:de:38:1e > ff:ff:ff:ff:ff:ff, BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0080, IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:10:18:de:38:1e, length 300
+    2  02:10:20.696008 00:10:18:de:38:1e > ff:ff:ff:ff:ff:ff, BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0020, IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:10:18:de:38:1e, length 300
+    3  02:10:23.151503 68:05:ca:18:47:70 > ff:ff:ff:ff:ff:ff, BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 0, IP 192.168.1.1 > 192.168.1.255: ICMP echo request, id 22737, seq 1, length 64
+    4  02:10:23.650963 00:10:18:de:38:1e > ff:ff:ff:ff:ff:ff, BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0080, IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:10:18:de:38:1e, length 300
+    5  02:10:23.712960 00:10:18:de:38:1e > ff:ff:ff:ff:ff:ff, BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0020, IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:10:18:de:38:1e, length 300
+    6  02:10:24.177588 68:05:ca:18:47:70 > ff:ff:ff:ff:ff:ff, BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 0, IP 192.168.1.1 > 192.168.1.255: ICMP echo request, id 22737, seq 2, length 64
+    7  02:10:25.201640 68:05:ca:18:47:70 > ff:ff:ff:ff:ff:ff, BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 0, IP 192.168.1.1 > 192.168.1.255: ICMP echo request, id 22737, seq 3, length 64
+    8  02:10:30.015266 68:05:ca:18:47:70 > 00:10:18:de:38:1e, BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 0, IP 192.168.1.1 > 192.168.1.115: ICMP echo request, id 22744, seq 1, length 64
+    9  02:10:30.015480 00:10:18:de:38:1e > 68:05:ca:18:47:70, BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0001, IP 192.168.1.115 > 192.168.1.1: ICMP echo reply, id 22744, seq 1, length 64
+   10  02:10:30.158348 00:10:18:de:38:1e > 68:05:ca:18:47:70, BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0001, IP 192.168.1.115.68 > 192.168.1.1.67: BOOTP/DHCP, Request from 00:10:18:de:38:1e, length 300
+   11  02:10:30.170023 68:05:ca:18:47:70 > 00:10:18:de:38:1e, BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 0, IP 192.168.1.1.67 > 192.168.1.115.68: BOOTP/DHCP, Reply, length 300
+   12  02:10:33.178632 00:10:18:de:38:1e > 68:05:ca:18:47:74, BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0002, IP 192.168.3.23.68 > 192.168.3.1.67: BOOTP/DHCP, Request from 00:10:18:de:38:1e, length 300
+   13  02:10:33.191027 68:05:ca:18:47:74 > 00:10:18:de:38:1e, BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 1, IP 192.168.3.1.67 > 192.168.3.23.68: BOOTP/DHCP, Reply, length 300
+   14  02:10:35.080973 00:10:18:de:38:1e > 68:05:ca:18:47:70, BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0001, ARP, Request who-has 192.168.1.1 tell 192.168.1.115, length 50
+   15  02:10:35.081198 68:05:ca:18:47:70 > 00:10:18:de:38:1e, BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 0, ARP, Reply 192.168.1.1 is-at 68:05:ca:18:47:70, length 46
+   16  02:10:35.249563 68:05:ca:18:47:70 > 00:10:18:de:38:1e, BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 0, ARP, Request who-has 192.168.1.115 tell 192.168.1.1, length 46
+   17  02:10:35.249634 00:10:18:de:38:1e > 68:05:ca:18:47:70, BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0001, ARP, Reply 192.168.1.115 is-at 00:10:18:de:38:1e, length 50
+   18  02:10:36.495763 68:05:ca:18:47:74 > 00:10:18:de:38:1e, BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 1, IP 192.168.3.1 > 192.168.3.23: ICMP echo request, id 22748, seq 1, length 64
+   19  02:10:36.495906 00:10:18:de:38:1e > 68:05:ca:18:47:74, BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0002, IP 192.168.3.23 > 192.168.3.1: ICMP echo reply, id 22748, seq 1, length 64
+   20  02:10:37.521654 68:05:ca:18:47:74 > 00:10:18:de:38:1e, BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 1, IP 192.168.3.1 > 192.168.3.23: ICMP echo request, id 22748, seq 2, length 64
+   21  02:10:37.521717 00:10:18:de:38:1e > 68:05:ca:18:47:74, BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0002, IP 192.168.3.23 > 192.168.3.1: ICMP echo reply, id 22748, seq 2, length 64
+   22  02:10:38.321557 68:05:ca:18:47:74 > 00:10:18:de:38:1e, BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 1, ARP, Request who-has 192.168.3.23 tell 192.168.3.1, length 46
+   23  02:10:38.321602 00:10:18:de:38:1e > 68:05:ca:18:47:74, BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0002, ARP, Reply 192.168.3.23 is-at 00:10:18:de:38:1e, length 50
diff --git a/tests/brcm-tag-prepend.out b/tests/brcm-tag-prepend.out
new file mode 100644 (file)
index 0000000..36153e2
--- /dev/null
@@ -0,0 +1,15 @@
+    1  04:48:55.079276 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 5, 68:05:ca:18:47:70 > 8a:62:38:14:5d:0b, ethertype IPv4 (0x0800), length 98: 192.168.1.1 > 192.168.1.151: ICMP echo request, id 2129, seq 1, length 64
+    2  04:48:55.079338 BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0020, 8a:62:38:14:5d:0b > 68:05:ca:18:47:70, ethertype IPv4 (0x0800), length 98: 192.168.1.151 > 192.168.1.1: ICMP echo reply, id 2129, seq 1, length 64
+    3  04:48:56.088510 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 5, 68:05:ca:18:47:70 > 8a:62:38:14:5d:0b, ethertype IPv4 (0x0800), length 98: 192.168.1.1 > 192.168.1.151: ICMP echo request, id 2129, seq 2, length 64
+    4  04:48:56.088532 BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0020, 8a:62:38:14:5d:0b > 68:05:ca:18:47:70, ethertype IPv4 (0x0800), length 98: 192.168.1.151 > 192.168.1.1: ICMP echo reply, id 2129, seq 2, length 64
+    5  04:48:57.112480 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 5, 68:05:ca:18:47:70 > 8a:62:38:14:5d:0b, ethertype IPv4 (0x0800), length 98: 192.168.1.1 > 192.168.1.151: ICMP echo request, id 2129, seq 3, length 64
+    6  04:48:57.112498 BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0020, 8a:62:38:14:5d:0b > 68:05:ca:18:47:70, ethertype IPv4 (0x0800), length 98: 192.168.1.151 > 192.168.1.1: ICMP echo reply, id 2129, seq 3, length 64
+    7  04:48:58.136493 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 5, 68:05:ca:18:47:70 > 8a:62:38:14:5d:0b, ethertype IPv4 (0x0800), length 98: 192.168.1.1 > 192.168.1.151: ICMP echo request, id 2129, seq 4, length 64
+    8  04:48:58.136510 BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0020, 8a:62:38:14:5d:0b > 68:05:ca:18:47:70, ethertype IPv4 (0x0800), length 98: 192.168.1.151 > 192.168.1.1: ICMP echo reply, id 2129, seq 4, length 64
+    9  04:49:00.184465 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 5, 68:05:ca:18:47:70 > 8a:62:38:14:5d:0b, ethertype ARP (0x0806), length 60: Request who-has 192.168.1.151 tell 192.168.1.1, length 46
+   10  04:49:00.184481 BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0020, 8a:62:38:14:5d:0b > 68:05:ca:18:47:70, ethertype ARP (0x0806), length 64: Reply 192.168.1.151 is-at 8a:62:38:14:5d:0b, length 50
+   11  04:49:00.383017 BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0020, 8a:62:38:14:5d:0b > 68:05:ca:18:47:70, ethertype ARP (0x0806), length 64: Request who-has 192.168.1.1 tell 192.168.1.151, length 50
+   12  04:49:00.383155 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 5, 68:05:ca:18:47:70 > 8a:62:38:14:5d:0b, ethertype ARP (0x0806), length 60: Reply 192.168.1.1 is-at 68:05:ca:18:47:70, length 46
+   13  04:49:00.607178 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 5, 68:05:ca:18:47:70 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 98: 192.168.1.1 > 192.168.1.255: ICMP echo request, id 2132, seq 1, length 64
+   14  04:49:01.624629 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 5, 68:05:ca:18:47:70 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 98: 192.168.1.1 > 192.168.1.255: ICMP echo request, id 2132, seq 2, length 64
+   15  04:49:02.648563 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 5, 68:05:ca:18:47:70 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 98: 192.168.1.1 > 192.168.1.255: ICMP echo request, id 2132, seq 3, length 64
diff --git a/tests/brcm-tag-prepend.pcap b/tests/brcm-tag-prepend.pcap
new file mode 100644 (file)
index 0000000..894d1ee
Binary files /dev/null and b/tests/brcm-tag-prepend.pcap differ
diff --git a/tests/brcm-tag.out b/tests/brcm-tag.out
new file mode 100644 (file)
index 0000000..06f96ad
--- /dev/null
@@ -0,0 +1,23 @@
+    1  02:10:20.634030 BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0080, IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:10:18:de:38:1e, length 300
+    2  02:10:20.696008 BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0020, IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:10:18:de:38:1e, length 300
+    3  02:10:23.151503 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 0, IP 192.168.1.1 > 192.168.1.255: ICMP echo request, id 22737, seq 1, length 64
+    4  02:10:23.650963 BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0080, IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:10:18:de:38:1e, length 300
+    5  02:10:23.712960 BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0020, IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:10:18:de:38:1e, length 300
+    6  02:10:24.177588 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 0, IP 192.168.1.1 > 192.168.1.255: ICMP echo request, id 22737, seq 2, length 64
+    7  02:10:25.201640 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 0, IP 192.168.1.1 > 192.168.1.255: ICMP echo request, id 22737, seq 3, length 64
+    8  02:10:30.015266 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 0, IP 192.168.1.1 > 192.168.1.115: ICMP echo request, id 22744, seq 1, length 64
+    9  02:10:30.015480 BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0001, IP 192.168.1.115 > 192.168.1.1: ICMP echo reply, id 22744, seq 1, length 64
+   10  02:10:30.158348 BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0001, IP 192.168.1.115.68 > 192.168.1.1.67: BOOTP/DHCP, Request from 00:10:18:de:38:1e, length 300
+   11  02:10:30.170023 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 0, IP 192.168.1.1.67 > 192.168.1.115.68: BOOTP/DHCP, Reply, length 300
+   12  02:10:33.178632 BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0002, IP 192.168.3.23.68 > 192.168.3.1.67: BOOTP/DHCP, Request from 00:10:18:de:38:1e, length 300
+   13  02:10:33.191027 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 1, IP 192.168.3.1.67 > 192.168.3.23.68: BOOTP/DHCP, Reply, length 300
+   14  02:10:35.080973 BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0001, ARP, Request who-has 192.168.1.1 tell 192.168.1.115, length 50
+   15  02:10:35.081198 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 0, ARP, Reply 192.168.1.1 is-at 68:05:ca:18:47:70, length 46
+   16  02:10:35.249563 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 0, ARP, Request who-has 192.168.1.115 tell 192.168.1.1, length 46
+   17  02:10:35.249634 BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0001, ARP, Reply 192.168.1.115 is-at 00:10:18:de:38:1e, length 50
+   18  02:10:36.495763 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 1, IP 192.168.3.1 > 192.168.3.23: ICMP echo request, id 22748, seq 1, length 64
+   19  02:10:36.495906 BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0002, IP 192.168.3.23 > 192.168.3.1: ICMP echo reply, id 22748, seq 1, length 64
+   20  02:10:37.521654 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 1, IP 192.168.3.1 > 192.168.3.23: ICMP echo request, id 22748, seq 2, length 64
+   21  02:10:37.521717 BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0002, IP 192.168.3.23 > 192.168.3.1: ICMP echo reply, id 22748, seq 2, length 64
+   22  02:10:38.321557 BRCM tag OP: EG, CID: 0, RC: exception, TC: 0, port: 1, ARP, Request who-has 192.168.3.23 tell 192.168.3.1, length 46
+   23  02:10:38.321602 BRCM tag OP: IG, TC: 0, TE: None, TS: 0, DST map: 0x0002, ARP, Reply 192.168.3.23 is-at 00:10:18:de:38:1e, length 50
diff --git a/tests/brcm-tag.pcap b/tests/brcm-tag.pcap
new file mode 100644 (file)
index 0000000..50b415d
Binary files /dev/null and b/tests/brcm-tag.pcap differ