scapy.contrib.dtp module

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 = [<class 'scapy.contrib.dtp.DTP'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (DTP).ver>, <Field (DTP).tlvlist>]
class scapy.contrib.dtp.DTPDomain

Bases: scapy.contrib.dtp.DtpGenericTlv

aliastypes = [<class 'scapy.contrib.dtp.DTPDomain'>, <class 'scapy.contrib.dtp.DtpGenericTlv'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (DTPDomain).type>, <Field (DTPDomain).length>, <Field (DTPDomain).domain>]
class scapy.contrib.dtp.DTPNeighbor

Bases: scapy.contrib.dtp.DtpGenericTlv

aliastypes = [<class 'scapy.contrib.dtp.DTPNeighbor'>, <class 'scapy.contrib.dtp.DtpGenericTlv'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (DTPNeighbor).type>, <Field (DTPNeighbor).len>, <Field (DTPNeighbor).neighbor>]
class scapy.contrib.dtp.DTPStatus

Bases: scapy.contrib.dtp.DtpGenericTlv

aliastypes = [<class 'scapy.contrib.dtp.DTPStatus'>, <class 'scapy.contrib.dtp.DtpGenericTlv'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (DTPStatus).type>, <Field (DTPStatus).length>, <Field (DTPStatus).status>]
class scapy.contrib.dtp.DTPType

Bases: scapy.contrib.dtp.DtpGenericTlv

aliastypes = [<class 'scapy.contrib.dtp.DTPType'>, <class 'scapy.contrib.dtp.DtpGenericTlv'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (DTPType).type>, <Field (DTPType).length>, <Field (DTPType).dtptype>]
class scapy.contrib.dtp.DtpGenericTlv

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.dtp.DtpGenericTlv'>, <class 'scapy.packet.Packet'>]
classmethod dispatch_hook(_pkt=None, *args, **kargs)
fields_desc = [<Field (DtpGenericTlv).type>, <Field (DtpGenericTlv).length>, <Field (DtpGenericTlv).value>]
guess_payload_class(p)

DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.

Parameters:payload (str) – the layer’s payload
Returns:the payload class
scapy.contrib.dtp.negotiate_trunk(iface='eth0', mymac='29:0e:3d:09:ca:9f')