scapy.layers.dhcp6

DHCPv6: Dynamic Host Configuration Protocol for IPv6. [RFC 3315]

class scapy.layers.dhcp6.DHCP6

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6 fields

msgtype

ByteEnumField

None

trid

X3BytesField

0

hashret()
class scapy.layers.dhcp6.DHCP6OptAuth

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptAuth fields

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
DHCP6OptBCMCSDomains fields

optcode

ShortEnumField

33

optlen

FieldLenField

None

bcmcsdomains

DomainNameListField

[]

class scapy.layers.dhcp6.DHCP6OptBCMCSServers

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptBCMCSServers fields

optcode

ShortEnumField

34

optlen

FieldLenField

None

bcmcsservers

IP6ListField

[]

class scapy.layers.dhcp6.DHCP6OptBootFileUrl

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptBootFileUrl fields

optcode

ShortEnumField

59

optlen

FieldLenField

None

optdata

StrLenField

b''

class scapy.layers.dhcp6.DHCP6OptClientArchType

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptClientArchType fields

optcode

ShortEnumField

61

optlen

FieldLenField

None

archtypes

FieldListField

[]

class scapy.layers.dhcp6.DHCP6OptClientFQDN

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptClientFQDN fields

optcode

ShortEnumField

39

optlen

FieldLenField

None

res

BitField (5 bits)

0

flags

FlagsField (3 bits)

<Flag 0 ()>

fqdn

DomainNameField

b''

class scapy.layers.dhcp6.DHCP6OptClientId

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptClientId fields

optcode

ShortEnumField

1

optlen

FieldLenField

None

duid

_DUIDField

b''

class scapy.layers.dhcp6.DHCP6OptClientLinkLayerAddr

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptClientLinkLayerAddr fields

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 fields

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 fields

optcode

ShortEnumField

24

optlen

FieldLenField

None

dnsdomains

DomainNameListField

[]

class scapy.layers.dhcp6.DHCP6OptDNSServers

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptDNSServers fields

optcode

ShortEnumField

23

optlen

FieldLenField

None

dnsservers

IP6ListField

[]

class scapy.layers.dhcp6.DHCP6OptERPDomain

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptERPDomain fields

optcode

ShortEnumField

65

optlen

FieldLenField

None

erpdomain

DomainNameListField

[]

class scapy.layers.dhcp6.DHCP6OptElapsedTime

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptElapsedTime fields

optcode

ShortEnumField

8

optlen

ShortField

2

elapsedtime

_ElapsedTimeField

0

class scapy.layers.dhcp6.DHCP6OptGeoConf

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptGeoConf fields

optcode

ShortEnumField

36

optlen

FieldLenField

None

optdata

StrLenField

b''

class scapy.layers.dhcp6.DHCP6OptIAAddress

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptIAAddress fields

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 fields

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 fields

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 fields

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 fields

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 fields

optcode

ShortEnumField

18

optlen

FieldLenField

None

ifaceid

StrLenField

b''

class scapy.layers.dhcp6.DHCP6OptInfoRefreshTime

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptInfoRefreshTime fields

optcode

ShortEnumField

32

optlen

ShortField

4

reftime

IntField

86400

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptLQClientLink fields

optcode

ShortEnumField

48

optlen

FieldLenField

None

linkaddress

IP6ListField

[]

class scapy.layers.dhcp6.DHCP6OptNISDomain

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptNISDomain fields

optcode

ShortEnumField

29

optlen

FieldLenField

None

nisdomain

DomainNameField

b''

class scapy.layers.dhcp6.DHCP6OptNISPDomain

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptNISPDomain fields

optcode

ShortEnumField

30

optlen

FieldLenField

None

nispdomain

DomainNameField

b''

class scapy.layers.dhcp6.DHCP6OptNISPServers

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptNISPServers fields

optcode

ShortEnumField

28

optlen

FieldLenField

None

nispservers

IP6ListField

[]

class scapy.layers.dhcp6.DHCP6OptNISServers

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptNISServers fields

optcode

ShortEnumField

27

optlen

FieldLenField

None

nisservers

IP6ListField

[]

class scapy.layers.dhcp6.DHCP6OptNewPOSIXTimeZone

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptNewPOSIXTimeZone fields

optcode

ShortEnumField

41

optlen

FieldLenField

None

optdata

StrLenField

b''

class scapy.layers.dhcp6.DHCP6OptNewTZDBTimeZone

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptNewTZDBTimeZone fields

optcode

ShortEnumField

42

optlen

FieldLenField

None

optdata

StrLenField

b''

class scapy.layers.dhcp6.DHCP6OptOptReq

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptOptReq fields

optcode

ShortEnumField

6

optlen

FieldLenField

None

reqopts

_OptReqListField

[23, 24]

class scapy.layers.dhcp6.DHCP6OptPanaAuthAgent

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptPanaAuthAgent fields

optcode

ShortEnumField

40

optlen

FieldLenField

None

paaaddr

IP6ListField

[]

class scapy.layers.dhcp6.DHCP6OptPref

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptPref fields

optcode

ShortEnumField

7

optlen

ShortField

1

prefval

ByteField

255

class scapy.layers.dhcp6.DHCP6OptRapidCommit

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptRapidCommit fields

optcode

ShortEnumField

14

optlen

ShortField

0

class scapy.layers.dhcp6.DHCP6OptReconfAccept

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptReconfAccept fields

optcode

ShortEnumField

20

optlen

ShortField

0

class scapy.layers.dhcp6.DHCP6OptReconfMsg

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptReconfMsg fields

optcode

ShortEnumField

19

optlen

ShortField

1

msgtype

ByteEnumField

11

class scapy.layers.dhcp6.DHCP6OptRelayAgentERO

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptRelayAgentERO fields

optcode

ShortEnumField

43

optlen

FieldLenField

None

reqopts

_OptReqListField

[23, 24]

class scapy.layers.dhcp6.DHCP6OptRelayMsg

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptRelayMsg fields

optcode

ShortEnumField

9

optlen

FieldLenField

None

message

PacketLenField

<DHCP6  |>

class scapy.layers.dhcp6.DHCP6OptRelaySuppliedOpt

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptRelaySuppliedOpt fields

optcode

ShortEnumField

66

optlen

FieldLenField

None

relaysupplied

PacketListField

[]

class scapy.layers.dhcp6.DHCP6OptRemoteID

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptRemoteID fields

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 fields

optcode

ShortEnumField

21

optlen

FieldLenField

None

sipdomains

DomainNameListField

[]

class scapy.layers.dhcp6.DHCP6OptSIPServers

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptSIPServers fields

optcode

ShortEnumField

22

optlen

FieldLenField

None

sipservers

IP6ListField

[]

class scapy.layers.dhcp6.DHCP6OptSNTPServers

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptSNTPServers fields

optcode

ShortEnumField

31

optlen

FieldLenField

None

sntpservers

IP6ListField

[]

class scapy.layers.dhcp6.DHCP6OptServerId

Bases: scapy.layers.dhcp6.DHCP6OptClientId

aliastypes
fields_desc
DHCP6OptServerId fields

optcode

ShortEnumField

2

optlen

FieldLenField

None

duid

_DUIDField

b''

class scapy.layers.dhcp6.DHCP6OptServerUnicast

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptServerUnicast fields

optcode

ShortEnumField

12

optlen

ShortField

16

srvaddr

_SrvAddrField

None

class scapy.layers.dhcp6.DHCP6OptStatusCode

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptStatusCode fields

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 fields

optcode

ShortEnumField

38

optlen

FieldLenField

None

subscriberid

StrLenField

b''

class scapy.layers.dhcp6.DHCP6OptUnknown

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptUnknown fields

optcode

ShortEnumField

0

optlen

FieldLenField

None

data

StrLenField

b''

class scapy.layers.dhcp6.DHCP6OptUserClass

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptUserClass fields

optcode

ShortEnumField

15

optlen

FieldLenField

None

userclassdata

_UserClassDataField

[]

class scapy.layers.dhcp6.DHCP6OptVSS

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
DHCP6OptVSS fields

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 fields

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 fields

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 fields

msgtype

ByteEnumField

2

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCP6_Confirm

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
fields_desc
DHCP6_Confirm fields

msgtype

ByteEnumField

4

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCP6_Decline

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
fields_desc
DHCP6_Decline fields

msgtype

ByteEnumField

9

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCP6_InfoRequest

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
fields_desc
DHCP6_InfoRequest fields

msgtype

ByteEnumField

11

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCP6_Rebind

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
fields_desc
DHCP6_Rebind fields

msgtype

ByteEnumField

6

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCP6_Reconf

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
fields_desc
DHCP6_Reconf fields

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 fields

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 fields

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 fields

msgtype

ByteEnumField

8

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCP6_Renew

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
fields_desc
DHCP6_Renew fields

msgtype

ByteEnumField

5

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCP6_Reply

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
answers(other)
fields_desc
DHCP6_Reply fields

msgtype

ByteEnumField

7

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCP6_Request

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
fields_desc
DHCP6_Request fields

msgtype

ByteEnumField

3

trid

X3BytesField

0

class scapy.layers.dhcp6.DHCP6_Solicit

Bases: scapy.layers.dhcp6.DHCP6

aliastypes
fields_desc
DHCP6_Solicit fields

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)

Send packets at layer 3

Parameters
  • x – the packets

  • inter – time (in s) between two packets (default 0)

  • loop – send packet indefinetly (default 0)

  • count – number of packets to send (default None=1)

  • verbose – verbose mode (default None=conf.verbose)

  • realtime – check that a packet was sent before sending the next one

  • return_packets – return the sent packets

  • socket – the socket to use (default is conf.L3socket(kargs))

  • iface – the interface to send the packets on

  • monitor – (not on linux) send in monitor mode

Returns

None

usage()
class scapy.layers.dhcp6.DUID_EN

Bases: scapy.packet.Packet

aliastypes
fields_desc
DUID_EN fields

type

ShortEnumField

2

enterprisenum

IntEnumField

311

id

StrField

b''

class scapy.layers.dhcp6.DUID_LL

Bases: scapy.packet.Packet

aliastypes
fields_desc
DUID_LL fields

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 fields

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 fields

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 fields

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 fields

len

FieldLenField

None

data

StrLenField

b''

class scapy.layers.dhcp6.VENDOR_SPECIFIC_OPTION

Bases: scapy.layers.dhcp6._DHCP6OptGuessPayload

aliastypes
fields_desc
VENDOR_SPECIFIC_OPTION fields

optcode

ShortField

None

optlen

FieldLenField

None

optdata

StrLenField

b''

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