scapy.contrib.dtp

DTP Scapy Extension

version

2008-12-22

author

Jochen Bartl <lobo@c3a.de>

Thanks

  • TLV code derived from the CDP implementation of scapy. (Thanks to Nicolas Bareil and Arnaud Ebalard) # noqa: E501

class scapy.contrib.dtp.DTP

Bases: scapy.packet.Packet

aliastypes
fields_desc
DTP fields

ver

ByteField

1

tlvlist

PacketListField

[]

class scapy.contrib.dtp.DTPDomain

Bases: scapy.contrib.dtp.DtpGenericTlv

aliastypes
fields_desc
DTPDomain fields

type

ShortField

1

length

FieldLenField

None

domain

StrLenField

b'\x00'

class scapy.contrib.dtp.DTPNeighbor

Bases: scapy.contrib.dtp.DtpGenericTlv

aliastypes
fields_desc
DTPNeighbor fields

type

ShortField

4

len

ShortField

10

neighbor

MACField

None

class scapy.contrib.dtp.DTPStatus

Bases: scapy.contrib.dtp.DtpGenericTlv

aliastypes
fields_desc
DTPStatus fields

type

ShortField

2

length

FieldLenField

None

status

StrLenField

b'\x03'

class scapy.contrib.dtp.DTPType

Bases: scapy.contrib.dtp.DtpGenericTlv

aliastypes
fields_desc
DTPType fields

type

ShortField

3

length

FieldLenField

None

dtptype

StrLenField

b'\xa5'

class scapy.contrib.dtp.DtpGenericTlv

Bases: scapy.packet.Packet

aliastypes
classmethod dispatch_hook(_pkt=None, *args, **kargs)
fields_desc
DtpGenericTlv fields

type

XShortField

1

length

FieldLenField

None

value

StrLenField

b''

guess_payload_class(p)
scapy.contrib.dtp.negotiate_trunk(iface='eth0', mymac='70:ef:fd:6d:8a:3c')