scapy.contrib.vtp
VTP Scapy Extension
- version:
2009-02-15
- copyright:
2009 by Jochen Bartl
- e-mail:
- license:
GPL v2
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- TODO:
Join messages
RE MD5 hash calculation
Have a closer look at 8 byte padding in summary adv:
“debug sw-vlan vtp packets” says the TLV length is invalid, when I change the values:
b'\x00\x00\x00\x01\x06\x01\x00\x02'x00x00 ?
x00x01 tlvtype?
x06 length?
x00x02 value?
h2i function for VTPTimeStampField
- References:
- Understanding VLAN Trunk Protocol (VTP)
- class scapy.contrib.vtp.VTP(_pkt, /, *, ver=2, code=1, followers=1, seq=1, reserved=0, domnamelen=None, domname=b'manbearpig', rev=0, uid='192.168.0.1', timestamp=b'930301000000', md5=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', vlaninfo=[], startvalue=0)[source]
Bases:
Packet- aliastypes = [<class 'scapy.contrib.vtp.VTP'>, <class 'scapy.packet.Packet'>]
- fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (VTP).ver>, <ByteEnumField (VTP).code>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <ByteField (VTP).domnamelen>, <StrFixedLenField (VTP).domname>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
- class scapy.contrib.vtp.VTPTimeStampField(name, default)[source]
Bases:
StrFixedLenField
- class scapy.contrib.vtp.VTPVlanInfo(_pkt, /, *, len=None, status=0, type=1, vlannamelen=None, vlanid=1, mtu=1500, dot10index=None, vlanname=b'default', tlvlist=[])[source]
Bases:
Packet- aliastypes = [<class 'scapy.contrib.vtp.VTPVlanInfo'>, <class 'scapy.packet.Packet'>]
- fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (VTPVlanInfo).len>, <ByteEnumField (VTPVlanInfo).status>, <ByteEnumField (VTPVlanInfo).type>, <FieldLenField (VTPVlanInfo).vlannamelen>, <ShortField (VTPVlanInfo).vlanid>, <ShortField (VTPVlanInfo).mtu>, <XIntField (VTPVlanInfo).dot10index>, <StrLenField (VTPVlanInfo).vlanname>, <scapy.fields.ConditionalField object>]
- class scapy.contrib.vtp.VTPVlanInfoTlv(_pkt, /, *, type=0, length=0, value=None)[source]
Bases:
Packet- aliastypes = [<class 'scapy.contrib.vtp.VTPVlanInfoTlv'>, <class 'scapy.packet.Packet'>]