scapy.layers.dhcp6

DHCPv6:IPv6的动态主机配置协议. [RFC 3315]

class scapy.layers.dhcp6.DHCP6

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6字段

msgtype

ByteEnumField

None

trid

X3BytesField

0

hashret()
class scapy.layers.dhcp6.DHCP6OptAuth

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptAuth字段

optcode

ShortEnumField

11

optlen

FieldLenField

None

proto

ByteField

3

alg

ByteField

1

rdm

ByteField

0

replay

StrFixedLenField

b'AAAAAAAA'

authinfo

StrLenField

b''

class scapy.layers.dhcp6.DHCP6OptBCMCSDomains

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptBCMCSmains字段

optcode

ShortEnumField

33

optlen

FieldLenField

None

bcmcsdomains

DomainNameListField

[]

class scapy.layers.dhcp6.DHCP6OptBCMCSServers

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptBCMCSServers字段

optcode

ShortEnumField

34

optlen

FieldLenField

None

bcmcsservers

IP6ListField

[]

class scapy.layers.dhcp6.DHCP6OptBootFileUrl

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptBootFileUrl字段

optcode

ShortEnumField

59

optlen

FieldLenField

None

optdata

StrLenField

b''

class scapy.layers.dhcp6.DHCP6OptClientArchType

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptClientArchType字段

optcode

ShortEnumField

61

optlen

FieldLenField

None

archtypes

FieldListField

[]

class scapy.layers.dhcp6.DHCP6OptClientFQDN

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptClientFQDN字段

optcode

ShortEnumField

39

optlen

FieldLenField

None

res

BitField (5位)

0

flags

FlagsField (3位)

<Flag 0 ()>

fqdn

DomainNameField

b''

class scapy.layers.dhcp6.DHCP6OptClientId

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptClientId字段

optcode

ShortEnumField

1

optlen

FieldLenField

None

duid

_DUIDField

b''

class scapy.layers.dhcp6.DHCP6OptClientLinkLayerAddr

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptClientLinkLayerAddr字段

optcode

ShortEnumField

79

optlen

FieldLenField

None

lltype

ShortField

1

clladdr

_LLAddrField

'00:00:00:00:00:00'

class scapy.layers.dhcp6.DHCP6OptClientNetworkInterId

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptClientNetworkInterId字段

optcode

ShortEnumField

62

optlen

ShortField

3

iitype

ByteField

0

iimajor

ByteField

0

iiminor

ByteField

0

class scapy.layers.dhcp6.DHCP6OptDNSDomains

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptDNSDomains字段

optcode

ShortEnumField

24

optlen

FieldLenField

None

dnsdomains

DomainNameListField

[]

class scapy.layers.dhcp6.DHCP6OptDNSServers

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptDNSServers字段

optcode

ShortEnumField

23

optlen

FieldLenField

None

dnsservers

IP6ListField

[]

class scapy.layers.dhcp6.DHCP6OptERPDomain

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptERPDomain字段

optcode

ShortEnumField

65

optlen

FieldLenField

None

erpdomain

DomainNameListField

[]

class scapy.layers.dhcp6.DHCP6OptElapsedTime

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptElapsedTime字段

optcode

ShortEnumField

8

optlen

ShortField

2

elapsedtime

_ElapsedTimeField

0

class scapy.layers.dhcp6.DHCP6OptGeoConf

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptGeoConf字段

optcode

ShortEnumField

36

optlen

FieldLenField

None

optdata

StrLenField

b''

class scapy.layers.dhcp6.DHCP6OptIAAddress

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptIAAddress字段

optcode

ShortEnumField

5

optlen

FieldLenField

None

addr

IP6Field

'::'

preflft

IntField

0

validlft

IntField

0

iaaddropts

StrLenField

b''

guess_payload_class(payload)
class scapy.layers.dhcp6.DHCP6OptIAPrefix

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptIAPrefix字段

optcode

ShortEnumField

26

optlen

FieldLenField

None

preflft

IntField

0

validlft

IntField

0

plen

ByteField

48

prefix

IP6Field

'2001:db8::'

iaprefopts

StrLenField

b''

class scapy.layers.dhcp6.DHCP6OptIA_NA

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptIA_NA字段

optcode

ShortEnumField

3

optlen

FieldLenField

None

iaid

XIntField

None

T1

IntField

None

T2

IntField

None

ianaopts

PacketListField

[]

class scapy.layers.dhcp6.DHCP6OptIA_PD

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptIA_PD字段

optcode

ShortEnumField

25

optlen

FieldLenField

None

iaid

XIntField

None

T1

IntField

None

T2

IntField

None

iapdopt

PacketListField

[]

class scapy.layers.dhcp6.DHCP6OptIA_TA

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptIA_TA字段

optcode

ShortEnumField

4

optlen

FieldLenField

None

iaid

XIntField

None

iataopts

PacketListField

[]

class scapy.layers.dhcp6.DHCP6OptIfaceId

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptIfaceId字段

optcode

ShortEnumField

18

optlen

FieldLenField

None

ifaceid

StrLenField

b''

class scapy.layers.dhcp6.DHCP6OptInfoRefreshTime

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptInfoRefreshTime字段

optcode

ShortEnumField

32

optlen

ShortField

4

reftime

IntField

86400

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptLQClientLink字段

optcode

ShortEnumField

48

optlen

FieldLenField

None

linkaddress

IP6ListField

[]

class scapy.layers.dhcp6.DHCP6OptNISDomain

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptNISDomain字段

optcode

ShortEnumField

29

optlen

FieldLenField

None

nisdomain

DomainNameField

b''

class scapy.layers.dhcp6.DHCP6OptNISPDomain

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptNISPDomain字段

optcode

ShortEnumField

30

optlen

FieldLenField

None

nispdomain

DomainNameField

b''

class scapy.layers.dhcp6.DHCP6OptNISPServers

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptNISPServers字段

optcode

ShortEnumField

28

optlen

FieldLenField

None

nispservers

IP6ListField

[]

class scapy.layers.dhcp6.DHCP6OptNISServers

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptNISServers字段

optcode

ShortEnumField

27

optlen

FieldLenField

None

nisservers

IP6ListField

[]

class scapy.layers.dhcp6.DHCP6OptNewPOSIXTimeZone

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptNewPOSIXTimeZone字段

optcode

ShortEnumField

41

optlen

FieldLenField

None

optdata

StrLenField

b''

class scapy.layers.dhcp6.DHCP6OptNewTZDBTimeZone

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptNewTZDBTimeZone字段

optcode

ShortEnumField

42

optlen

FieldLenField

None

optdata

StrLenField

b''

class scapy.layers.dhcp6.DHCP6OptOptReq

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptOptReq字段

optcode

ShortEnumField

6

optlen

FieldLenField

None

reqopts

_OptReqListField

[23, 24]

class scapy.layers.dhcp6.DHCP6OptPanaAuthAgent

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptPanaAuthAgent字段

optcode

ShortEnumField

40

optlen

FieldLenField

None

paaaddr

IP6ListField

[]

class scapy.layers.dhcp6.DHCP6OptPref

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptPref字段

optcode

ShortEnumField

7

optlen

ShortField

1

prefval

ByteField

255

class scapy.layers.dhcp6.DHCP6OptRapidCommit

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptRapidCommit字段

optcode

ShortEnumField

14

optlen

ShortField

0

class scapy.layers.dhcp6.DHCP6OptReconfAccept

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptReconfAccept字段

optcode

ShortEnumField

20

optlen

ShortField

0

class scapy.layers.dhcp6.DHCP6OptReconfMsg

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptReconfMsg字段

optcode

ShortEnumField

19

optlen

ShortField

1

msgtype

ByteEnumField

11

class scapy.layers.dhcp6.DHCP6OptRelayAgentERO

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptRelayAgentERO字段

optcode

ShortEnumField

43

optlen

FieldLenField

None

reqopts

_OptReqListField

[23, 24]

class scapy.layers.dhcp6.DHCP6OptRelayMsg

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptRelayMsg字段

optcode

ShortEnumField

9

optlen

FieldLenField

None

message

PacketLenField

<DHCP6  |>

class scapy.layers.dhcp6.DHCP6OptRelaySuppliedOpt

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptRelaySuppliedOpt字段

optcode

ShortEnumField

66

optlen

FieldLenField

None

relaysupplied

PacketListField

[]

class scapy.layers.dhcp6.DHCP6OptRemoteID

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptRemoteID字段

optcode

ShortEnumField

37

optlen

FieldLenField

None

enterprisenum

IntEnumField

None

remoteid

StrLenField

b''

class scapy.layers.dhcp6.DHCP6OptSIPDomains

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptSIPDomains字段

optcode

ShortEnumField

21

optlen

FieldLenField

None

sipdomains

DomainNameListField

[]

class scapy.layers.dhcp6.DHCP6OptSIPServers

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptSIPServers字段

optcode

ShortEnumField

22

optlen

FieldLenField

None

sipservers

IP6ListField

[]

class scapy.layers.dhcp6.DHCP6OptSNTPServers

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptSNTPServers字段

optcode

ShortEnumField

31

optlen

FieldLenField

None

sntpservers

IP6ListField

[]

class scapy.layers.dhcp6.DHCP6OptServerId

Bases: scapy.layers.dhcp6.DHCP6OptClientId

aliastypes
fields_desc
DHCP6OptServerId字段

optcode

ShortEnumField

2

optlen

FieldLenField

None

duid

_DUIDField

b''

class scapy.layers.dhcp6.DHCP6OptServerUnicast

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptServerUnicast字段

optcode

ShortEnumField

12

optlen

ShortField

16

srvaddr

_SrvAddrField

None

class scapy.layers.dhcp6.DHCP6OptStatusCode

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptStatusCode字段

optcode

ShortEnumField

13

optlen

FieldLenField

None

statuscode

ShortEnumField

None

statusmsg

StrLenField

b''

class scapy.layers.dhcp6.DHCP6OptSubscriberID

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptSubscriberID字段

optcode

ShortEnumField

38

optlen

FieldLenField

None

subscriberid

StrLenField

b''

class scapy.layers.dhcp6.DHCP6OptUnknown

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptUnknown字段

optcode

ShortEnumField

0

optlen

FieldLenField

None

data

StrLenField

b''

class scapy.layers.dhcp6.DHCP6OptUserClass

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptUserClass字段

optcode

ShortEnumField

15

optlen

FieldLenField

None

userclassdata

_UserClassDataField

[]

class scapy.layers.dhcp6.DHCP6OptVSS

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptVSS字段

optcode

ShortEnumField

68

optlen

FieldLenField

None

type

ByteField

255

data

StrLenField

b''

class scapy.layers.dhcp6.DHCP6OptVendorClass

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptVendorClass字段

optcode

ShortEnumField

16

optlen

FieldLenField

None

enterprisenum

IntEnumField

None

vcdata

_VendorClassDataField

[]

class scapy.layers.dhcp6.DHCP6OptVendorSpecificInfo

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptVendorSpecificInfo字段

optcode

ShortEnumField

17

optlen

FieldLenField

None

enterprisenum

IntEnumField

None

vso

_VendorClassDataField

[]

class scapy.layers.dhcp6.DHCP6_Advertise

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
answers(other)
fields_desc
DHCP6_Advertise字段

msgtype

ByteEnumField

2

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCP6_Confirm

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
fields_desc
DHCP6_Confirm字段

msgtype

ByteEnumField

4

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCP6_Decline

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
fields_desc
DHCP6_Decline字段

msgtype

ByteEnumField

9

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCP6_InfoRequest

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
fields_desc
DHCP6_InfoRequest字段

msgtype

ByteEnumField

11

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCP6_Rebind

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
fields_desc
DHCP6_Rebind字段

msgtype

ByteEnumField

6

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCP6_Reconf

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
fields_desc
DHCP6_Reconf字段

msgtype

ByteEnumField

10

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCP6_RelayForward

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload, scapy.packet.Packet

aliastypes
fields_desc
DHCP6_RelayForward字段

msgtype

ByteEnumField

12

hopcount

ByteField

None

linkaddr

IP6Field

'::'

peeraddr

IP6Field

'::'

hashret()
class scapy.layers.dhcp6.DHCP6_RelayReply

Bases: scapy.layers.dhcp6.DHCP6_RelayForward

aliastypes
answers(other)
fields_desc
DHCP6_RelayReply字段

msgtype

ByteEnumField

13

hopcount

ByteField

None

linkaddr

IP6Field

'::'

peeraddr

IP6Field

'::'

hashret()
class scapy.layers.dhcp6.DHCP6_Release

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
fields_desc
DHCP6_Release字段

msgtype

ByteEnumField

8

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCP6_Renew

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
fields_desc
DHCP6_Renew字段

msgtype

ByteEnumField

5

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCP6_Reply

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
answers(other)
fields_desc
DHCP6_Reply字段

msgtype

ByteEnumField

7

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCP6_Request

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
fields_desc
DHCP6_Request字段

msgtype

ByteEnumField

3

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCP6_Solicit

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
fields_desc
DHCP6_Solicit字段

msgtype

ByteEnumField

1

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCPv6_am(**kargs)

Bases: scapy.ansmachine.AnsweringMachine

filter = 'udp and port 546 and port 547'
function_name = 'dhcp6d'
is_request(p)
make_reply(req)
parse_options(dns='2001:500::1035', domain='localdomain, local', startip='2001:db8::1', endip='2001:db8::20', duid=None, sntpservers=None, sipdomains=None, sipservers=None, nisdomain=None, nisservers=None, nispdomain=None, nispservers=None, bcmcsservers=None, bcmcsdomains=None, iface=None, debug=0, advpref=255)
print_reply(req, reply)
static send_function(x, inter=0, loop=0, count=None, verbose=None, realtime=None, return_packets=False, socket=None, *args, **kargs)

在第3层发送数据包

Parameters
  • x –数据包

  • -两个分组(默认为0)之间的时间(以秒)

  • 循环 –不确定地发送数据包(默认为0)

  • count –要发送的数据包数量(默认为None = 1)

  • 详细 –详细模式(默认为None = conf.verbose)

  • 实时 –在发送下一个之前检查包是否已发送

  • return_packets –返回发送的数据包

  • socket –要使用的套接字(默认为conf.L3socket(kargs))

  • iface –发送数据包的接口

  • 监视器 –(不是在Linux上)以监视器模式发送

Returns

None

usage()
class scapy.layers.dhcp6.DUID_EN

Bases: scapy.packet.Packet

aliastypes
fields_desc
DUID_EN字段

type

ShortEnumField

2

enterprisenum

IntEnumField

311

id

StrField

b''

class scapy.layers.dhcp6.DUID_LL

Bases: scapy.packet.Packet

aliastypes
fields_desc
DUID_LL字段

type

ShortEnumField

3

hwtype

XShortEnumField

1

lladdr

_LLAddrField

'00:00:00:00:00:00'

class scapy.layers.dhcp6.DUID_LLT

Bases: scapy.packet.Packet

aliastypes
fields_desc
DUID_LLT字段

type

ShortEnumField

1

hwtype

XShortEnumField

1

timeval

_UTCTimeField

0

lladdr

_LLAddrField

'00:00:00:00:00:00'

class scapy.layers.dhcp6.DUID_UUID

Bases: scapy.packet.Packet

aliastypes
fields_desc
DUID_UUID字段

type

ShortEnumField

4

uuid

UUIDField

None

class scapy.layers.dhcp6.DomainNameField(name, default, fld=None, length_from=None, max_length=None)

Bases: scapy.fields.StrLenField

getfield(pkt, s)
i2len(pkt, x)
i2m(pkt, x)
m2i(pkt, x)
class scapy.layers.dhcp6.USER_CLASS_DATA

Bases: scapy.packet.Packet

aliastypes
fields_desc
USER_CLASS_DATA字段

len

FieldLenField

None

data

StrLenField

b''

guess_payload_class(payload)
class scapy.layers.dhcp6.VENDOR_CLASS_DATA

Bases: scapy.layers.dhcp6.USER_CLASS_DATA

aliastypes
fields_desc
VENDOR_CLASS_DATA字段

len

FieldLenField

None

data

StrLenField

b''

class scapy.layers.dhcp6.VENDOR_SPECIFIC_OPTION

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
VENDOR_SPECIFIC_OPTION字段

optcode

ShortField

None

optlen

FieldLenField

None

optdata

StrLenField

b''

guess_payload_class(payload)
scapy.layers.dhcp6.get_cls(name, fallback_cls)