i need to generate an STP traffic but when I capture it via wireshark it says that tlv (tag-length-value) of the vlan is missing and tlv record is truncated prematurely this is my code:
sendp(Dot3(dst="01:00:0c:cc:cc:cd", src="08:17:35:51:29:2e")/LLC(dsap=0xaa, ssap=0xaa, ctrl=3)/SNAP(OUI=0x0c, code=0x010b)/STP(rootid=8406, portid=0x802e, pathcost=19, rootmac="2c:33:11:53:85:80",bridgeid=32982, bridgemac="08:17:35:51:29:00")/data)
the data in root identifier and bridge identifier changed, which is not desired and a new problem appeared as shown in the picture above so what should I add/delete in my line of code to overcome the tlv vlan problem?
I think taht you need to replace the layer Dot3 by Ether
here are 3 exemples:
for the 3 exemples:
exemple number 1:
output:
exemple number 2:
output:
=> see how scapy is confused by this packet?
what I think you need to send: exemple 3:
output:
scapy looks happier