scapy.contrib.cdp

class scapy.contrib.cdp.CDPAddrRecord

Bases: scapy.packet.Packet

aliastypes
fields_desc
CDPAddrRecord字段

ptype

ByteEnumField

1

plen

FieldLenField

None

proto

StrLenField

None

addrlen

FieldLenField

None

addr

StrLenField

None

guess_payload_class(p)
class scapy.contrib.cdp.CDPAddrRecordIPv4

Bases: scapy.contrib.cdp.CDPAddrRecord

aliastypes
fields_desc
CDPAddrRecordIPv4字段

ptype

ByteEnumField

1

plen

FieldLenField

1

proto

StrLenField

b'\xcc'

addrlen

ShortField

4

addr

IPField

'0.0.0.0'

class scapy.contrib.cdp.CDPAddrRecordIPv6

Bases: scapy.contrib.cdp.CDPAddrRecord

aliastypes
fields_desc
CDPAddrRecordIPv6字段

ptype

ByteEnumField

2

plen

FieldLenField

8

proto

StrLenField

b'\xaa\xaa\x03\x00\x00\x00\x86\xdd'

addrlen

ShortField

16

addr

IP6Field

'::1'

class scapy.contrib.cdp.CDPMsg

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsg字段

type

XShortEnumField

None

len

FieldLenField

None

val

StrLenField

b''

class scapy.contrib.cdp.CDPMsgAddr

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsgAddr字段

type

XShortEnumField

2

len

ShortField

None

naddr

FieldLenField

None

addr

PacketListField

[]

post_build(pkt, pay)
class scapy.contrib.cdp.CDPMsgCapabilities

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsgCapabilities字段

type

XShortEnumField

4

len

ShortField

8

cap

FlagsField (32位)

<Flag 0 ()>

class scapy.contrib.cdp.CDPMsgDeviceID

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsgDeviceID字段

type

XShortEnumField

1

len

FieldLenField

None

val

StrLenField

b''

class scapy.contrib.cdp.CDPMsgDuplex

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsgDuplex字段

type

XShortEnumField

11

len

ShortField

5

duplex

ByteEnumField

0

class scapy.contrib.cdp.CDPMsgGeneric

Bases: scapy.packet.Packet

aliastypes
fields_desc
CDPMsg通用字段

type

XShortEnumField

None

len

FieldLenField

None

val

StrLenField

b''

guess_payload_class(p)
class scapy.contrib.cdp.CDPMsgIPGateway

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsgIPGateway字段

type

XShortEnumField

7

len

ShortField

8

defaultgw

IPField

'192.168.0.1'

class scapy.contrib.cdp.CDPMsgIPPrefix

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsgIPPrefix字段

type

XShortEnumField

7

len

ShortField

9

prefix

IPField

'192.168.0.1'

plen

ByteField

24

class scapy.contrib.cdp.CDPMsgMTU

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsgMTU字段

type

XShortEnumField

17

len

ShortField

6

mtu

ShortField

1500

class scapy.contrib.cdp.CDPMsgMgmtAddr

Bases: scapy.contrib.cdp.CDPMsgAddr

aliastypes
fields_desc
CDPMsgMgmtAddr字段

type

XShortEnumField

22

len

ShortField

None

naddr

FieldLenField

None

addr

PacketListField

[]

class scapy.contrib.cdp.CDPMsgNativeVLAN

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsgNativeVLAN字段

type

XShortEnumField

10

len

ShortField

6

vlan

ShortField

1

class scapy.contrib.cdp.CDPMsgPlatform

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsgPlatform字段

type

XShortEnumField

6

len

FieldLenField

None

val

StrLenField

b''

class scapy.contrib.cdp.CDPMsgPortID

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsgPortID字段

type

XShortEnumField

3

len

FieldLenField

None

iface

StrLenField

b'Port 1'

class scapy.contrib.cdp.CDPMsgPower

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsgPower字段

type

XShortEnumField

16

len

ShortField

6

power

_CDPPowerField

1337

class scapy.contrib.cdp.CDPMsgProtoHello

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsgProtoHello字段

type

XShortEnumField

8

len

ShortField

32

oui

X3BytesField

12

protocol_id

XShortField

0

data

StrLenField

b''

class scapy.contrib.cdp.CDPMsgSoftwareVersion

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsgSoftwareVersion字段

type

XShortEnumField

5

len

FieldLenField

None

val

StrLenField

b''

class scapy.contrib.cdp.CDPMsgTrustBitmap

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsgTrustBitmap字段

type

XShortEnumField

18

len

ShortField

5

trust_bitmap

XByteField

0

class scapy.contrib.cdp.CDPMsgUnknown19

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsgUnknown19个字段

type

XShortEnumField

25

len

FieldLenField

None

val

StrLenField

b''

class scapy.contrib.cdp.CDPMsgUntrustedPortCoS

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsgUntrustedPortCoS字段

type

XShortEnumField

19

len

ShortField

5

untrusted_port_cos

XByteField

0

class scapy.contrib.cdp.CDPMsgVTPMgmtDomain

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsgVTPMgmtDomain字段

type

XShortEnumField

9

len

FieldLenField

None

val

StrLenField

b''

class scapy.contrib.cdp.CDPMsgVoIPVLANQuery

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsgVoIPVLANQuery字段

type

XShortEnumField

15

len

FieldLenField

None

unknown1

XByteField

0

vlan

ShortField

1

unknown2

StrLenField

b''

class scapy.contrib.cdp.CDPMsgVoIPVLANReply

Bases: scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPMsgVoIPVLANReply字段

type

XShortEnumField

14

len

ShortField

7

status?

ByteField

1

vlan

ShortField

1

class scapy.contrib.cdp.CDPv2_HDR

Bases: scapy.contrib.cdp._CDPChecksum, scapy.contrib.cdp.CDPMsgGeneric

aliastypes
fields_desc
CDPv2_HDR字段

vers

ByteField

2

ttl

ByteField

180

cksum

XShortField

None

msg

PacketListField

[]