scapy.layers.inet6

IPv6 (Internet Protocol v6).

class scapy.layers.inet6.AS_resolver6(server: str | None = None, port: int = 43, options: str | None = None)[源代码]

基类:AS_resolver_riswhois

class scapy.layers.inet6.CaptivePortalURI(name: str, default: bytes, length_from: Callable[[Packet], int] | None = None, max_length: Any | None = None)[源代码]

基类:StrLenField

i2len(pkt, x)[源代码]
i2m(pkt, x)[源代码]
m2i(pkt, x)[源代码]
class scapy.layers.inet6.DomainNameListField(name, default, length_from=None, padded=False)[源代码]

基类:StrLenField

i2len(pkt, x)[源代码]
i2m(pkt, x)[源代码]
islist = 1
m2i(pkt, x)[源代码]
padded
padded_unit = 8
class scapy.layers.inet6.HAO(_pkt, /, *, otype=201, optlen=16, hoa='::')[源代码]

基类:Packet

aliastypes
alignment_delta(curpos)[源代码]
extract_padding(p)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |     OPTLEN    |              HOA              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                             Fig. HAO                             
HAO fields

otype

_OTypeField

201

optlen

ByteField

16

hoa

IP6Field

'::'

class scapy.layers.inet6.HBHOptUnknown(_pkt, /, *, otype=1, optlen=None, optdata=b'')[源代码]

基类:Packet

aliastypes
alignment_delta(curpos)[源代码]

As specified in section 4.2 of RFC 2460, every options has an alignment requirement usually expressed xn+y, meaning the Option Type must appear at an integer multiple of x octets from the start of the header, plus y octets.

That function is provided the current position from the start of the header and returns required padding length.

classmethod dispatch_hook(_pkt=None, *args, **kargs)[源代码]
extract_padding(p)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |     OPTLEN    |            OPTDATA            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. HBHOptUnknown                        
HBHOptUnknown fields

otype

_OTypeField

1

optlen

FieldLenField

None

optdata

StrLenField

b''

class scapy.layers.inet6.ICMPv6DestUnreach(_pkt, /, *, type=1, code=0, cksum=None, length=0, unused=0)[源代码]

基类:_ICMPv6Error

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     LENGTH    |                     UNUSED                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                      Fig. ICMPv6DestUnreach                      
ICMPv6DestUnreach fields

type

ByteEnumField

1

code

ByteEnumField

0

cksum

XShortField

None

length

ByteField

0

unused

X3BytesField

0

post_dissection(pkt)[源代码]
class scapy.layers.inet6.ICMPv6EchoReply(_pkt, /, *, type=129, code=0, cksum=None, id=0, seq=0, data=b'')[源代码]

基类:ICMPv6EchoRequest

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               ID              |              SEQ              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. ICMPv6EchoReply                       
ICMPv6EchoReply fields

type

ByteEnumField

129

code

ByteField

0

cksum

XShortField

None

id

XShortField

0

seq

XShortField

0

data

StrField

b''

class scapy.layers.inet6.ICMPv6EchoRequest(_pkt, /, *, type=128, code=0, cksum=None, id=0, seq=0, data=b'')[源代码]

基类:_ICMPv6

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               ID              |              SEQ              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. ICMPv6EchoRequest                      
ICMPv6EchoRequest fields

type

ByteEnumField

128

code

ByteField

0

cksum

XShortField

None

id

XShortField

0

seq

XShortField

0

data

StrField

b''

hashret()[源代码]
mysummary()[源代码]
class scapy.layers.inet6.ICMPv6HAADReply(_pkt, /, *, type=145, code=0, cksum=None, id=None, R=1, res=0, addresses=[])[源代码]

基类:_ICMPv6

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               ID              |R|             RES             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           ADDRESSES           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. ICMPv6HAADReply                       
ICMPv6HAADReply fields

type

ByteEnumField

145

code

ByteField

0

cksum

XShortField

None

id

XShortField

None

R

BitEnumField

1

res

XBitField (15 bits)

0

addresses

IP6ListField

[]

hashret()[源代码]
class scapy.layers.inet6.ICMPv6HAADRequest(_pkt, /, *, type=144, code=0, cksum=None, id=None, R=1, res=0)[源代码]

基类:_ICMPv6

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               ID              |R|             RES             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. ICMPv6HAADRequest                      
ICMPv6HAADRequest fields

type

ByteEnumField

144

code

ByteField

0

cksum

XShortField

None

id

XShortField

None

R

BitEnumField

1

res

XBitField (15 bits)

0

hashret()[源代码]
class scapy.layers.inet6.ICMPv6MLDMultAddrRec(_pkt, /, *, rtype=4, auxdata_len=None, sources_number=None, dst='::', sources=[], auxdata=b'')[源代码]

基类:Packet

aliastypes
default_payload_class(packet)[源代码]

Multicast Address Record followed by another one

fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     RTYPE     |  AUXDATA LEN  |         SOURCES NUMBER        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              DST                              |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            SOURCES            |            AUXDATA            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. ICMPv6MLDMultAddrRec                     
ICMPv6MLDMultAddrRec fields

rtype

ByteField

4

auxdata_len

FieldLenField

None

sources_number

FieldLenField

None

dst

IP6Field

'::'

sources

IP6ListField

[]

auxdata

StrLenField

b''

class scapy.layers.inet6.ICMPv6MLDone(_pkt, /, *, type=132, code=0, cksum=None, mrd=0, reserved=0, mladdr='::')[源代码]

基类:_ICMPv6ML

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              MRD              |            RESERVED           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             MLADDR                            |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. ICMPv6MLDone                         
ICMPv6MLDone fields

type

ByteEnumField

132

code

ByteField

0

cksum

XShortField

None

mrd

ShortField

0

reserved

ShortField

0

mladdr

IP6Field

'::'

class scapy.layers.inet6.ICMPv6MLQuery(_pkt, /, *, type=130, code=0, cksum=None, mrd=10000, reserved=0, mladdr='::')[源代码]

基类:_ICMPv6ML

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              MRD              |            RESERVED           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             MLADDR                            |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. ICMPv6MLQuery                        
ICMPv6MLQuery fields

type

ByteEnumField

130

code

ByteField

0

cksum

XShortField

None

mrd

ShortField

10000

reserved

ShortField

0

mladdr

IP6Field

'::'

class scapy.layers.inet6.ICMPv6MLQuery2(_pkt, /, *, type=130, code=0, cksum=None, mrd=10000, reserved=0, mladdr='::', Resv=0, S=0, QRV=0, QQIC=0, sources_number=None, sources=[])[源代码]

基类:_ICMPv6

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              MRD              |            RESERVED           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             MLADDR                            |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  RESV |S| QRV |      QQIC     |         SOURCES NUMBER        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            SOURCES            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. ICMPv6MLQuery2                        
ICMPv6MLQuery2 fields

type

ByteEnumField

130

code

ByteField

0

cksum

XShortField

None

mrd

ShortField

10000

reserved

ShortField

0

mladdr

IP6Field

'::'

Resv

BitField (4 bits)

0

S

BitField (1 bit)

0

QRV

BitField (3 bits)

0

QQIC

ByteField

0

sources_number

ShortField

None

sources

IP6ListField

[]

post_build(packet, payload)[源代码]

Compute the 'sources_number' field when needed

class scapy.layers.inet6.ICMPv6MLReport(_pkt, /, *, type=131, code=0, cksum=None, mrd=0, reserved=0, mladdr='::')[源代码]

基类:_ICMPv6ML

aliastypes
answers(query)[源代码]

Check the query type

fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              MRD              |            RESERVED           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             MLADDR                            |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. ICMPv6MLReport                        
ICMPv6MLReport fields

type

ByteEnumField

131

code

ByteField

0

cksum

XShortField

None

mrd

ShortField

0

reserved

ShortField

0

mladdr

IP6Field

'::'

class scapy.layers.inet6.ICMPv6MLReport2(_pkt, /, *, type=143, res=0, cksum=None, reserved=0, records_number=None, records=[])[源代码]

基类:_ICMPv6

aliastypes
answers(query)[源代码]

Check the query type

fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      RES      |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            RESERVED           |         RECORDS NUMBER        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            RECORDS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. ICMPv6MLReport2                       
ICMPv6MLReport2 fields

type

ByteEnumField

143

res

ByteField

0

cksum

XShortField

None

reserved

ShortField

0

records_number

ShortField

None

records

PacketListField

[]

post_build(packet, payload)[源代码]

Compute the 'records_number' field when needed

class scapy.layers.inet6.ICMPv6MPAdv(_pkt, /, *, type=147, code=0, cksum=None, id=None, flags=2, res=0)[源代码]

基类:_ICMPv6NDGuessPayload, _ICMPv6

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               ID              |FLA|            RES            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. ICMPv6MPAdv                         
ICMPv6MPAdv fields

type

ByteEnumField

147

code

ByteField

0

cksum

XShortField

None

id

XShortField

None

flags

BitEnumField

2

res

XBitField (14 bits)

0

hashret()[源代码]
class scapy.layers.inet6.ICMPv6MPSol(_pkt, /, *, type=146, code=0, cksum=None, id=None, res=0)[源代码]

基类:_ICMPv6

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               ID              |              RES              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. ICMPv6MPSol                         
ICMPv6MPSol fields

type

ByteEnumField

146

code

ByteField

0

cksum

XShortField

None

id

XShortField

None

res

XShortField

0

class scapy.layers.inet6.ICMPv6MRD_Advertisement(_pkt, /, *, type=151, advinter=20, cksum=None, queryint=0, robustness=0)[源代码]

基类:_ICMPv6

aliastypes
extract_padding(s)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |    ADVINTER   |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            QUERYINT           |           ROBUSTNESS          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. ICMPv6MRD_Advertisement                   
ICMPv6MRD_Advertisement fields

type

ByteEnumField

151

advinter

ByteField

20

cksum

XShortField

None

queryint

ShortField

0

robustness

ShortField

0

class scapy.layers.inet6.ICMPv6MRD_Solicitation(_pkt, /, *, type=152, res=0, cksum=None)[源代码]

基类:_ICMPv6

aliastypes
extract_padding(s)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      RES      |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. ICMPv6MRD_Solicitation                    
ICMPv6MRD_Solicitation fields

type

ByteEnumField

152

res

ByteField

0

cksum

XShortField

None

class scapy.layers.inet6.ICMPv6MRD_Termination(_pkt, /, *, type=153, res=0, cksum=None)[源代码]

基类:_ICMPv6

aliastypes
extract_padding(s)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      RES      |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. ICMPv6MRD_Termination                    
ICMPv6MRD_Termination fields

type

ByteEnumField

153

res

ByteField

0

cksum

XShortField

None

class scapy.layers.inet6.ICMPv6NDOptAdvInterval(_pkt, /, *, type=7, len=1, res=0, advint=0)[源代码]

基类:_ICMPv6NDGuessPayload, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |              RES              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             ADVINT                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. ICMPv6NDOptAdvInterval                    
ICMPv6NDOptAdvInterval fields

type

ByteField

7

len

ByteField

1

res

ShortField

0

advint

IntField

0

mysummary()[源代码]
class scapy.layers.inet6.ICMPv6NDOptCaptivePortal(_pkt, /, *, type=37, len=None, URI=b'')[源代码]

基类:_ICMPv6NDGuessPayload, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |              URI              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. ICMPv6NDOptCaptivePortal                   
ICMPv6NDOptCaptivePortal fields

type

ByteField

37

len

FieldLenField

None

URI

CaptivePortalURI

b''

mysummary()[源代码]
class scapy.layers.inet6.ICMPv6NDOptDNSSL(_pkt, /, *, type=31, len=None, res=None, lifetime=4294967295, searchlist=[])[源代码]

基类:_ICMPv6NDGuessPayload, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |              RES              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            LIFETIME                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           SEARCHLIST          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. ICMPv6NDOptDNSSL                       
ICMPv6NDOptDNSSL fields

type

ByteField

31

len

FieldLenField

None

res

ShortField

None

lifetime

IntField

4294967295

searchlist

DomainNameListField

[]

mysummary()[源代码]
class scapy.layers.inet6.ICMPv6NDOptDstLLAddr(_pkt, /, *, type=2, len=1, lladdr='00:00:00:00:00:00')[源代码]

基类:ICMPv6NDOptSrcLLAddr

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |             LLADDR            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. ICMPv6NDOptDstLLAddr                     
ICMPv6NDOptDstLLAddr fields

type

ByteField

2

len

ByteField

1

lladdr

MACField

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

class scapy.layers.inet6.ICMPv6NDOptEFA(_pkt, /, *, type=26, len=1, res=0)[源代码]

基类:_ICMPv6NDGuessPayload, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |              RES              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. ICMPv6NDOptEFA                        
ICMPv6NDOptEFA fields

type

ByteField

26

len

ByteField

1

res

BitField (48 bits)

0

class scapy.layers.inet6.ICMPv6NDOptHAInfo(_pkt, /, *, type=8, len=1, res=0, pref=0, lifetime=1)[源代码]

基类:_ICMPv6NDGuessPayload, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |              RES              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              PREF             |            LIFETIME           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. ICMPv6NDOptHAInfo                      
ICMPv6NDOptHAInfo fields

type

ByteField

8

len

ByteField

1

res

ShortField

0

pref

ShortField

0

lifetime

ShortField

1

mysummary()[源代码]
class scapy.layers.inet6.ICMPv6NDOptIPAddr(_pkt, /, *, type=17, len=3, optcode=1, plen=64, res=0, addr='::')[源代码]

基类:_ICMPv6NDGuessPayload, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |    OPTCODE    |      PLEN     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              RES                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ADDR                             |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. ICMPv6NDOptIPAddr                      
ICMPv6NDOptIPAddr fields

type

ByteField

17

len

ByteField

3

optcode

ByteEnumField

1

plen

ByteField

64

res

IntField

0

addr

IP6Field

'::'

class scapy.layers.inet6.ICMPv6NDOptLLA(_pkt, /, *, type=19, len=1, optcode=0, lla='00:00:00:00:00:00')[源代码]

基类:_ICMPv6NDGuessPayload, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |    OPTCODE    |      LLA      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               +
|                                                               |
+               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                       Fig. ICMPv6NDOptLLA                        
ICMPv6NDOptLLA fields

type

ByteField

19

len

ByteField

1

optcode

ByteEnumField

0

lla

MACField

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

class scapy.layers.inet6.ICMPv6NDOptMAP(_pkt, /, *, type=23, len=3, dist=1, pref=15, R=1, res=0, validlifetime=4294967295, addr='::')[源代码]

基类:_ICMPv6NDGuessPayload, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |  DIST |  PREF |R|     RES     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         VALIDLIFETIME                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ADDR                             |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. ICMPv6NDOptMAP                        
ICMPv6NDOptMAP fields

type

ByteField

23

len

ByteField

3

dist

BitField (4 bits)

1

pref

BitField (4 bits)

15

R

BitField (1 bit)

1

res

BitField (7 bits)

0

validlifetime

IntField

4294967295

addr

IP6Field

'::'

class scapy.layers.inet6.ICMPv6NDOptMTU(_pkt, /, *, type=5, len=1, res=0, mtu=1280)[源代码]

基类:_ICMPv6NDGuessPayload, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |              RES              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              MTU                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. ICMPv6NDOptMTU                        
ICMPv6NDOptMTU fields

type

ByteField

5

len

ByteField

1

res

XShortField

0

mtu

IntField

1280

mysummary()[源代码]
class scapy.layers.inet6.ICMPv6NDOptNewRtrPrefix(_pkt, /, *, type=18, len=3, optcode=0, plen=64, res=0, prefix='::')[源代码]

基类:_ICMPv6NDGuessPayload, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |    OPTCODE    |      PLEN     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              RES                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             PREFIX                            |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. ICMPv6NDOptNewRtrPrefix                   
ICMPv6NDOptNewRtrPrefix fields

type

ByteField

18

len

ByteField

3

optcode

ByteField

0

plen

ByteField

64

res

IntField

0

prefix

IP6Field

'::'

class scapy.layers.inet6.ICMPv6NDOptPREF64(_pkt, /, *, type=38, len=2, scaledlifetime=0, plc=0, prefix='::')[源代码]

基类:_ICMPv6NDGuessPayload, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |      SCALEDLIFETIME     | PLC |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             PREFIX                            |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. ICMPv6NDOptPREF64                      
ICMPv6NDOptPREF64 fields

type

ByteField

38

len

ByteField

2

scaledlifetime

BitField (13 bits)

0

plc

BitEnumField

0

prefix

_PREF64

'::'

mysummary()[源代码]
class scapy.layers.inet6.ICMPv6NDOptPrefixInfo(_pkt, /, *, type=3, len=4, prefixlen=64, L=1, A=1, R=0, res1=0, validlifetime=4294967295, preferredlifetime=4294967295, res2=0, prefix='::')[源代码]

基类:_ICMPv6NDGuessPayload, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |   PREFIXLEN   |L|A|R|   RES1  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         VALIDLIFETIME                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       PREFERREDLIFETIME                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              RES2                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             PREFIX                            |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. ICMPv6NDOptPrefixInfo                    
ICMPv6NDOptPrefixInfo fields

type

ByteField

3

len

ByteField

4

prefixlen

ByteField

64

L

BitField (1 bit)

1

A

BitField (1 bit)

1

R

BitField (1 bit)

0

res1

BitField (5 bits)

0

validlifetime

XIntField

4294967295

preferredlifetime

XIntField

4294967295

res2

XIntField

0

prefix

IP6Field

'::'

mysummary()[源代码]
class scapy.layers.inet6.ICMPv6NDOptRDNSS(_pkt, /, *, type=25, len=None, res=None, lifetime=4294967295, dns=[])[源代码]

基类:_ICMPv6NDGuessPayload, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |              RES              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            LIFETIME                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DNS              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. ICMPv6NDOptRDNSS                       
ICMPv6NDOptRDNSS fields

type

ByteField

25

len

FieldLenField

None

res

ShortField

None

lifetime

IntField

4294967295

dns

IP6ListField

[]

mysummary()[源代码]
class scapy.layers.inet6.ICMPv6NDOptRedirectedHdr(_pkt, /, *, type=4, len=None, res=b'\x00\x00\x00\x00\x00\x00', pkt=b'')[源代码]

基类:_ICMPv6NDGuessPayload, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |              RES              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              PKT              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. ICMPv6NDOptRedirectedHdr                   
ICMPv6NDOptRedirectedHdr fields

type

ByteField

4

len

FieldLenField

None

res

MayEnd

b'\x00\x00\x00\x00\x00\x00'

pkt

TruncPktLenField

b''

class scapy.layers.inet6.ICMPv6NDOptRouteInfo(_pkt, /, *, type=24, len=None, plen=None, res1=0, prf=0, res2=0, rtlifetime=4294967295, prefix=None)[源代码]

基类:_ICMPv6NDGuessPayload, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |      PLEN     | RES1|PRF| RES2|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           RTLIFETIME                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             PREFIX                            |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. ICMPv6NDOptRouteInfo                     
ICMPv6NDOptRouteInfo fields

type

ByteField

24

len

FieldLenField

None

plen

ByteField

None

res1

BitField (3 bits)

0

prf

BitEnumField

0

res2

BitField (3 bits)

0

rtlifetime

IntField

4294967295

prefix

_IP6PrefixField

None

mysummary()[源代码]
class scapy.layers.inet6.ICMPv6NDOptShortcutLimit(_pkt, /, *, type=6, len=1, shortcutlim=40, res1=0, res2=0)[源代码]

基类:_ICMPv6NDGuessPayload, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |  SHORTCUTLIM  |      RES1     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              RES2                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. ICMPv6NDOptShortcutLimit                   
ICMPv6NDOptShortcutLimit fields

type

ByteField

6

len

ByteField

1

shortcutlim

ByteField

40

res1

ByteField

0

res2

IntField

0

class scapy.layers.inet6.ICMPv6NDOptSrcAddrList(_pkt, /, *, type=9, len=None, res=b'\x00\x00\x00\x00\x00\x00', addrlist=[])[源代码]

基类:_ICMPv6NDGuessPayload, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |              RES              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            ADDRLIST           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. ICMPv6NDOptSrcAddrList                    
ICMPv6NDOptSrcAddrList fields

type

ByteField

9

len

FieldLenField

None

res

StrFixedLenField

b'\x00\x00\x00\x00\x00\x00'

addrlist

IP6ListField

[]

class scapy.layers.inet6.ICMPv6NDOptSrcLLAddr(_pkt, /, *, type=1, len=1, lladdr='00:00:00:00:00:00')[源代码]

基类:_ICMPv6NDGuessPayload, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |             LLADDR            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. ICMPv6NDOptSrcLLAddr                     
ICMPv6NDOptSrcLLAddr fields

type

ByteField

1

len

ByteField

1

lladdr

MACField

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

mysummary()[源代码]
class scapy.layers.inet6.ICMPv6NDOptTgtAddrList(_pkt, /, *, type=10, len=None, res=b'\x00\x00\x00\x00\x00\x00', addrlist=[])[源代码]

基类:ICMPv6NDOptSrcAddrList

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |              RES              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            ADDRLIST           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. ICMPv6NDOptTgtAddrList                    
ICMPv6NDOptTgtAddrList fields

type

ByteField

10

len

FieldLenField

None

res

StrFixedLenField

b'\x00\x00\x00\x00\x00\x00'

addrlist

IP6ListField

[]

class scapy.layers.inet6.ICMPv6NDOptUnknown(_pkt, /, *, type=None, len=None, data=b'')[源代码]

基类:_ICMPv6NDGuessPayload, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. ICMPv6NDOptUnknown                      
ICMPv6NDOptUnknown fields

type

ByteField

None

len

FieldLenField

None

data

StrLenField

b''

class scapy.layers.inet6.ICMPv6ND_INDAdv(_pkt, /, *, type=142, code=0, cksum=None, reserved=0)[源代码]

基类:_ICMPv6NDGuessPayload, _ICMPv6

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            RESERVED                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. ICMPv6ND_INDAdv                       
ICMPv6ND_INDAdv fields

type

ByteEnumField

142

code

ByteField

0

cksum

XShortField

None

reserved

XIntField

0

class scapy.layers.inet6.ICMPv6ND_INDSol(_pkt, /, *, type=141, code=0, cksum=None, reserved=0)[源代码]

基类:_ICMPv6NDGuessPayload, _ICMPv6

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            RESERVED                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. ICMPv6ND_INDSol                       
ICMPv6ND_INDSol fields

type

ByteEnumField

141

code

ByteField

0

cksum

XShortField

None

reserved

XIntField

0

class scapy.layers.inet6.ICMPv6ND_NA(_pkt, /, *, type=136, code=0, cksum=None, R=1, S=0, O=1, res=0, tgt='::')[源代码]

基类:_ICMPv6NDGuessPayload, _ICMPv6, Packet

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|R|S|O|                           RES                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              TGT                              |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. ICMPv6ND_NA                         
ICMPv6ND_NA fields

type

ByteEnumField

136

code

ByteField

0

cksum

XShortField

None

R

BitField (1 bit)

1

S

BitField (1 bit)

0

O

BitField (1 bit)

1

res

XBitField (29 bits)

0

tgt

IP6Field

'::'

hashret()[源代码]
mysummary()[源代码]
class scapy.layers.inet6.ICMPv6ND_NS(_pkt, /, *, type=135, code=0, cksum=None, res=0, tgt='::')[源代码]

基类:_ICMPv6NDGuessPayload, _ICMPv6, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              RES                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              TGT                              |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. ICMPv6ND_NS                         
ICMPv6ND_NS fields

type

ByteEnumField

135

code

ByteField

0

cksum

XShortField

None

res

IntField

0

tgt

IP6Field

'::'

hashret()[源代码]
mysummary()[源代码]
class scapy.layers.inet6.ICMPv6ND_RA(_pkt, /, *, type=134, code=0, cksum=None, chlim=0, M=0, O=0, H=0, prf=1, P=0, res=0, routerlifetime=1800, reachabletime=0, retranstimer=0)[源代码]

基类:_ICMPv6NDGuessPayload, _ICMPv6

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     CHLIM     |M|O|H|PRF|P|RES|         ROUTERLIFETIME        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         REACHABLETIME                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          RETRANSTIMER                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. ICMPv6ND_RA                         
ICMPv6ND_RA fields

type

ByteEnumField

134

code

ByteField

0

cksum

XShortField

None

chlim

ByteField

0

M

BitField (1 bit)

0

O

BitField (1 bit)

0

H

BitField (1 bit)

0

prf

BitEnumField

1

P

BitField (1 bit)

0

res

BitField (2 bits)

0

routerlifetime

ShortField

1800

reachabletime

IntField

0

retranstimer

IntField

0

mysummary()[源代码]
class scapy.layers.inet6.ICMPv6ND_RS(_pkt, /, *, type=133, code=0, cksum=None, res=0)[源代码]

基类:_ICMPv6NDGuessPayload, _ICMPv6

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              RES                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. ICMPv6ND_RS                         
ICMPv6ND_RS fields

type

ByteEnumField

133

code

ByteField

0

cksum

XShortField

None

res

IntField

0

class scapy.layers.inet6.ICMPv6ND_Redirect(_pkt, /, *, type=137, code=0, cksum=None, res=0, tgt='::', dst='::')[源代码]

基类:_ICMPv6NDGuessPayload, _ICMPv6, Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              RES                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              TGT                              |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              DST                              |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. ICMPv6ND_Redirect                      
ICMPv6ND_Redirect fields

type

ByteEnumField

137

code

ByteField

0

cksum

XShortField

None

res

XIntField

0

tgt

IP6Field

'::'

dst

IP6Field

'::'

class scapy.layers.inet6.ICMPv6NIQueryIPv4(_pkt, /, *, type=139, code=None, cksum=None, qtype=4, unused=0, flags=<Flag 0 ()>, nonce=<RandBin>, data=(1, b'\x00\x00\x00'))[源代码]

基类:ICMPv6NIQueryNOOP

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             QTYPE             |       UNUSED      |   FLAGS   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             NONCE                             |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. ICMPv6NIQueryIPv4                      
ICMPv6NIQueryIPv4 fields

type

ByteEnumField

139

code

NIQueryCodeField

None

cksum

XShortField

None

qtype

ShortEnumField

4

unused

BitField (10 bits)

0

flags

FlagsField

<Flag 0 ()>

nonce

NonceField

<RandBin>

data

NIQueryDataField

(1, b'\x00\x00\x00')

class scapy.layers.inet6.ICMPv6NIQueryIPv6(_pkt, /, *, type=139, code=None, cksum=None, qtype=3, unused=0, flags=62, nonce=<RandBin>, data=(1, b'\x00\x00\x00'))[源代码]

基类:ICMPv6NIQueryNOOP

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             QTYPE             |       UNUSED      |   FLAGS   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             NONCE                             |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. ICMPv6NIQueryIPv6                      
ICMPv6NIQueryIPv6 fields

type

ByteEnumField

139

code

NIQueryCodeField

None

cksum

XShortField

None

qtype

ShortEnumField

3

unused

BitField (10 bits)

0

flags

FlagsField

62

nonce

NonceField

<RandBin>

data

NIQueryDataField

(1, b'\x00\x00\x00')

class scapy.layers.inet6.ICMPv6NIQueryNOOP(_pkt, /, *, type=139, code=None, cksum=None, qtype=0, unused=0, flags=<Flag 0 ()>, nonce=<RandBin>, data=(1, b'\x00\x00\x00'))[源代码]

基类:_ICMPv6NIHashret, _ICMPv6

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             QTYPE             |       UNUSED      |   FLAGS   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             NONCE                             |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. ICMPv6NIQueryNOOP                      
ICMPv6NIQueryNOOP fields

type

ByteEnumField

139

code

NIQueryCodeField

None

cksum

XShortField

None

qtype

ShortEnumField

0

unused

BitField (10 bits)

0

flags

FlagsField

<Flag 0 ()>

nonce

NonceField

<RandBin>

data

NIQueryDataField

(1, b'\x00\x00\x00')

class scapy.layers.inet6.ICMPv6NIQueryName(_pkt, /, *, type=139, code=None, cksum=None, qtype=2, unused=0, flags=<Flag 0 ()>, nonce=<RandBin>, data=(1, b'\x00\x00\x00'))[源代码]

基类:ICMPv6NIQueryNOOP

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             QTYPE             |       UNUSED      |   FLAGS   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             NONCE                             |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. ICMPv6NIQueryName                      
ICMPv6NIQueryName fields

type

ByteEnumField

139

code

NIQueryCodeField

None

cksum

XShortField

None

qtype

ShortEnumField

2

unused

BitField (10 bits)

0

flags

FlagsField

<Flag 0 ()>

nonce

NonceField

<RandBin>

data

NIQueryDataField

(1, b'\x00\x00\x00')

class scapy.layers.inet6.ICMPv6NIReplyIPv4(_pkt, /, *, type=140, code=0, cksum=None, qtype=4, unused=0, flags=<Flag 0 ()>, nonce=<RandBin>, data=(0, None))[源代码]

基类:ICMPv6NIReplyNOOP

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             QTYPE             |       UNUSED      |   FLAGS   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             NONCE                             |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. ICMPv6NIReplyIPv4                      
ICMPv6NIReplyIPv4 fields

type

ByteEnumField

140

code

ByteEnumField

0

cksum

XShortField

None

qtype

ShortEnumField

4

unused

BitField (10 bits)

0

flags

FlagsField

<Flag 0 ()>

nonce

NonceField

<RandBin>

data

NIReplyDataField

(0, None)

class scapy.layers.inet6.ICMPv6NIReplyIPv6(_pkt, /, *, type=140, code=0, cksum=None, qtype=3, unused=0, flags=<Flag 0 ()>, nonce=<RandBin>, data=(0, None))[源代码]

基类:ICMPv6NIReplyNOOP

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             QTYPE             |       UNUSED      |   FLAGS   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             NONCE                             |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. ICMPv6NIReplyIPv6                      
ICMPv6NIReplyIPv6 fields

type

ByteEnumField

140

code

ByteEnumField

0

cksum

XShortField

None

qtype

ShortEnumField

3

unused

BitField (10 bits)

0

flags

FlagsField

<Flag 0 ()>

nonce

NonceField

<RandBin>

data

NIReplyDataField

(0, None)

class scapy.layers.inet6.ICMPv6NIReplyNOOP(_pkt, /, *, type=140, code=0, cksum=None, qtype=0, unused=0, flags=<Flag 0 ()>, nonce=<RandBin>, data=(0, None))[源代码]

基类:_ICMPv6NIAnswers, _ICMPv6NIHashret, _ICMPv6

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             QTYPE             |       UNUSED      |   FLAGS   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             NONCE                             |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. ICMPv6NIReplyNOOP                      
ICMPv6NIReplyNOOP fields

type

ByteEnumField

140

code

ByteEnumField

0

cksum

XShortField

None

qtype

ShortEnumField

0

unused

BitField (10 bits)

0

flags

FlagsField

<Flag 0 ()>

nonce

NonceField

<RandBin>

data

NIReplyDataField

(0, None)

class scapy.layers.inet6.ICMPv6NIReplyName(_pkt, /, *, type=140, code=0, cksum=None, qtype=2, unused=0, flags=<Flag 0 ()>, nonce=<RandBin>, data=(0, None))[源代码]

基类:ICMPv6NIReplyNOOP

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             QTYPE             |       UNUSED      |   FLAGS   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             NONCE                             |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. ICMPv6NIReplyName                      
ICMPv6NIReplyName fields

type

ByteEnumField

140

code

ByteEnumField

0

cksum

XShortField

None

qtype

ShortEnumField

2

unused

BitField (10 bits)

0

flags

FlagsField

<Flag 0 ()>

nonce

NonceField

<RandBin>

data

NIReplyDataField

(0, None)

class scapy.layers.inet6.ICMPv6NIReplyRefuse(_pkt, /, *, type=140, code=1, cksum=None, qtype=0, unused=0, flags=<Flag 0 ()>, nonce=<RandBin>, data=(0, None))[源代码]

基类:ICMPv6NIReplyNOOP

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             QTYPE             |       UNUSED      |   FLAGS   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             NONCE                             |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. ICMPv6NIReplyRefuse                     
ICMPv6NIReplyRefuse fields

type

ByteEnumField

140

code

ByteEnumField

1

cksum

XShortField

None

qtype

ShortEnumField

0

unused

BitField (10 bits)

0

flags

FlagsField

<Flag 0 ()>

nonce

NonceField

<RandBin>

data

NIReplyDataField

(0, None)

class scapy.layers.inet6.ICMPv6NIReplyUnknown(_pkt, /, *, type=140, code=2, cksum=None, qtype=0, unused=0, flags=<Flag 0 ()>, nonce=<RandBin>, data=(0, None))[源代码]

基类:ICMPv6NIReplyNOOP

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             QTYPE             |       UNUSED      |   FLAGS   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             NONCE                             |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. ICMPv6NIReplyUnknown                     
ICMPv6NIReplyUnknown fields

type

ByteEnumField

140

code

ByteEnumField

2

cksum

XShortField

None

qtype

ShortEnumField

0

unused

BitField (10 bits)

0

flags

FlagsField

<Flag 0 ()>

nonce

NonceField

<RandBin>

data

NIReplyDataField

(0, None)

class scapy.layers.inet6.ICMPv6PacketTooBig(_pkt, /, *, type=2, code=0, cksum=None, mtu=1280)[源代码]

基类:_ICMPv6Error

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              MTU                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. ICMPv6PacketTooBig                      
ICMPv6PacketTooBig fields

type

ByteEnumField

2

code

ByteField

0

cksum

XShortField

None

mtu

IntField

1280

class scapy.layers.inet6.ICMPv6ParamProblem(_pkt, /, *, type=4, code=0, cksum=None, ptr=6)[源代码]

基类:_ICMPv6Error

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              PTR                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. ICMPv6ParamProblem                      
ICMPv6ParamProblem fields

type

ByteEnumField

4

code

ByteEnumField

0

cksum

XShortField

None

ptr

IntField

6

class scapy.layers.inet6.ICMPv6RPL(_pkt, /, *, type=155, code=0, cksum=None)[源代码]

基类:_ICMPv6

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. ICMPv6RPL                          
ICMPv6RPL fields

type

ByteEnumField

155

code

ByteEnumField

0

cksum

XShortField

None

payload_guess

Possible sublayers: RPLDAOACK, RPLDAO, RPLDCOACK, RPLDCO, RPLDIO, RPLDIS

class scapy.layers.inet6.ICMPv6TimeExceeded(_pkt, /, *, type=3, code=0, cksum=None, length=0, unused=0)[源代码]

基类:_ICMPv6Error

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     LENGTH    |                     UNUSED                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                     Fig. ICMPv6TimeExceeded                      
ICMPv6TimeExceeded fields

type

ByteEnumField

3

code

ByteEnumField

0

cksum

XShortField

None

length

ByteField

0

unused

X3BytesField

0

post_dissection(pkt)[源代码]
class scapy.layers.inet6.ICMPv6Unknown(_pkt, /, *, type=1, code=0, cksum=None, msgbody=b'')[源代码]

基类:_ICMPv6

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      CODE     |             CKSUM             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            MSGBODY            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. ICMPv6Unknown                        
ICMPv6Unknown fields

type

ByteEnumField

1

code

ByteField

0

cksum

XShortField

None

msgbody

StrField

b''

class scapy.layers.inet6.IP6ListField(name, default, count_from=None, length_from=None)[源代码]

基类:StrField

count_from
getfield(pkt, s)[源代码]
i2count(pkt, i)[源代码]
i2len(pkt, i)[源代码]
i2m(pkt, x)[源代码]
i2repr(pkt, x)[源代码]
islist = 1
length_from
class scapy.layers.inet6.IPerror6(_pkt, /, *, version=6, tc=0, fl=0, plen=None, nh=59, hlim=64, src=None, dst=None)[源代码]

基类:IPv6

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|VERSION|       TC      |                   FL                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              PLEN             |       NH      |      HLIM     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              SRC                              |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              DST                              |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. IPerror6                           
IPerror6 fields

version

BitField (4 bits)

6

tc

BitField (8 bits)

0

fl

BitField (20 bits)

0

plen

ShortField

None

nh

ByteEnumField

59

hlim

ByteField

64

src

SourceIP6Field

None

dst

DestIP6Field

None

mysummary()[源代码]
payload_guess

Possible sublayers: TCPerror, UDPerror, SCTPerror

class scapy.layers.inet6.IPv46(_pkt, /, *, version=4, ihl=None, tos=0, len=None, id=1, flags=<Flag 0 ()>, frag=0, ttl=64, proto=0, chksum=None, src=None, dst=None, options=[])[源代码]

基类:IP

This class implements a dispatcher that is used to detect the IP version while parsing Raw IP pcap files.

aliastypes
classmethod dispatch_hook(_pkt=None, *_, **kargs)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|VERSION|  IHL  |      TOS      |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               ID              |FLAGS|           FRAG          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TTL      |     PROTO     |             CHKSUM            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              SRC                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              DST                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            OPTIONS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                            Fig. IPv46                            
IPv46 fields

version

BitField (4 bits)

4

ihl

BitField (4 bits)

None

tos

XByteField

0

len

ShortField

None

id

ShortField

1

flags

FlagsField

<Flag 0 ()>

frag

BitField (13 bits)

0

ttl

ByteField

64

proto

ByteEnumField

0

chksum

XShortField

None

src

SourceIPField

None

dst

DestIPField

None

options

PacketListField

[]

class scapy.layers.inet6.IPv6(_pkt, /, *, version=6, tc=0, fl=0, plen=None, nh=59, hlim=64, src=None, dst=None)[源代码]

基类:_IPv6GuessPayload, Packet, IPTools

aliastypes
answers(other)[源代码]
extract_padding(data)[源代码]

Extract the IPv6 payload

fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|VERSION|       TC      |                   FL                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              PLEN             |       NH      |      HLIM     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              SRC                              |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              DST                              |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                            Fig. IPv6                             
IPv6 fields

version

BitField (4 bits)

6

tc

BitField (8 bits)

0

fl

BitField (20 bits)

0

plen

ShortField

None

nh

ByteEnumField

59

hlim

ByteField

64

src

SourceIP6Field

None

dst

DestIP6Field

None

hashret()[源代码]
mysummary()[源代码]
payload_guess

Possible sublayers: EIGRP, MPLS, OSPFv3_Hdr, IP, TCP, UDP, IPv6, AH, ESP, GRE, SCTP, VRRPv3

post_build(p, pay)[源代码]
route()[源代码]

Used to select the L2 address

class scapy.layers.inet6.IPv6ExtHdrDestOpt(_pkt, /, *, nh=59, len=None, autopad=1, options=[])[源代码]

基类:_IPv6ExtHdr

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       NH      |      LEN      |    AUTOPAD    |    OPTIONS    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                      Fig. IPv6ExtHdrDestOpt                      
IPv6ExtHdrDestOpt fields

nh

ByteEnumField

59

len

FieldLenField

None

autopad

_PhantomAutoPadField

1

options

_OptionsField

[]

class scapy.layers.inet6.IPv6ExtHdrFragment(_pkt, /, *, nh=59, res1=0, offset=0, res2=0, m=0, id=None)[源代码]

基类:_IPv6ExtHdr

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       NH      |      RES1     |          OFFSET         |RES|M|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               ID                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. IPv6ExtHdrFragment                      
IPv6ExtHdrFragment fields

nh

ByteEnumField

59

res1

BitField (8 bits)

0

offset

BitField (13 bits)

0

res2

BitField (2 bits)

0

m

BitField (1 bit)

0

id

IntField

None

guess_payload_class(p)[源代码]
class scapy.layers.inet6.IPv6ExtHdrHopByHop(_pkt, /, *, nh=59, len=None, autopad=1, options=[])[源代码]

基类:_IPv6ExtHdr

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       NH      |      LEN      |    AUTOPAD    |    OPTIONS    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                     Fig. IPv6ExtHdrHopByHop                      
IPv6ExtHdrHopByHop fields

nh

ByteEnumField

59

len

FieldLenField

None

autopad

_PhantomAutoPadField

1

options

_OptionsField

[]

class scapy.layers.inet6.IPv6ExtHdrRouting(_pkt, /, *, nh=59, len=None, type=0, segleft=None, reserved=0, addresses=[])[源代码]

基类:_IPv6ExtHdr

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       NH      |      LEN      |      TYPE     |    SEGLEFT    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            RESERVED                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           ADDRESSES           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. IPv6ExtHdrRouting                      
IPv6ExtHdrRouting fields

nh

ByteEnumField

59

len

FieldLenField

None

type

ByteField

0

segleft

ByteField

None

reserved

BitField (32 bits)

0

addresses

IP6ListField

[]

post_build(pkt, pay)[源代码]
class scapy.layers.inet6.IPv6ExtHdrSegmentRouting(_pkt, /, *, nh=59, len=None, type=4, segleft=None, lastentry=None, unused1=0, protected=0, oam=0, alert=0, hmac=0, unused2=0, tag=0, addresses=['::1'], tlv_objects=[])[源代码]

基类:_IPv6ExtHdr

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       NH      |      LEN      |      TYPE     |    SEGLEFT    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   LASTENTRY   |U|P|O|A|H|UNUSE|              TAG              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           ADDRESSES           |          TLV OBJECTS          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. IPv6ExtHdrSegmentRouting                   
IPv6ExtHdrSegmentRouting fields

nh

ByteEnumField

59

len

ByteField

None

type

ByteField

4

segleft

ByteField

None

lastentry

ByteField

None

unused1

BitField (1 bit)

0

protected

BitField (1 bit)

0

oam

BitField (1 bit)

0

alert

BitField (1 bit)

0

hmac

BitField (1 bit)

0

unused2

BitField (3 bits)

0

tag

ShortField

0

addresses

IP6ListField

['::1']

tlv_objects

PacketListField

[]

post_build(pkt, pay)[源代码]
class scapy.layers.inet6.IPv6ExtHdrSegmentRoutingTLV(_pkt, /, *, type=None, len=0, value=b'')[源代码]

基类:Packet

aliastypes
classmethod dispatch_hook(pkt=None, *args, **kargs)[源代码]
extract_padding(p)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |             VALUE             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. IPv6ExtHdrSegmentRoutingTLV                 
IPv6ExtHdrSegmentRoutingTLV fields

type

ByteEnumField

None

len

ByteField

0

value

StrLenField

b''

classmethod register_variant()[源代码]
registered_sr_tlv = {0: <class 'scapy.layers.inet6.IPv6ExtHdrSegmentRoutingTLVPad1'>, 1: <class 'scapy.layers.inet6.IPv6ExtHdrSegmentRoutingTLVIngressNode'>, 2: <class 'scapy.layers.inet6.IPv6ExtHdrSegmentRoutingTLVEgressNode'>, 4: <class 'scapy.layers.inet6.IPv6ExtHdrSegmentRoutingTLVPadN'>, 5: <class 'scapy.layers.inet6.IPv6ExtHdrSegmentRoutingTLVHMAC'>, None: <class 'scapy.layers.inet6.IPv6ExtHdrSegmentRoutingTLV'>}
class scapy.layers.inet6.IPv6ExtHdrSegmentRoutingTLVEgressNode(_pkt, /, *, type=2, len=18, reserved=0, flags=0, egress_node='::1')[源代码]

基类:IPv6ExtHdrSegmentRoutingTLV

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |    RESERVED   |     FLAGS     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          EGRESS NODE                          |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

            Fig. IPv6ExtHdrSegmentRoutingTLVEgressNode            
IPv6ExtHdrSegmentRoutingTLVEgressNode fields

type

ByteEnumField

2

len

ByteField

18

reserved

ByteField

0

flags

ByteField

0

egress_node

IP6Field

'::1'

class scapy.layers.inet6.IPv6ExtHdrSegmentRoutingTLVHMAC(_pkt, /, *, type=5, len=None, D=0, reserved=0, hmackeyid=0, hmac=b'')[源代码]

基类:IPv6ExtHdrSegmentRoutingTLV

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |              LEN              |D|   RESERVED  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |                   HMACKEYID                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |              HMAC             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

               Fig. IPv6ExtHdrSegmentRoutingTLVHMAC               
IPv6ExtHdrSegmentRoutingTLVHMAC fields

type

ByteEnumField

5

len

FieldLenField

None

D

BitField (1 bit)

0

reserved

BitField (15 bits)

0

hmackeyid

IntField

0

hmac

StrLenField

b''

class scapy.layers.inet6.IPv6ExtHdrSegmentRoutingTLVIngressNode(_pkt, /, *, type=1, len=18, reserved=0, flags=0, ingress_node='::1')[源代码]

基类:IPv6ExtHdrSegmentRoutingTLV

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |    RESERVED   |     FLAGS     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          INGRESS NODE                         |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

           Fig. IPv6ExtHdrSegmentRoutingTLVIngressNode            
IPv6ExtHdrSegmentRoutingTLVIngressNode fields

type

ByteEnumField

1

len

ByteField

18

reserved

ByteField

0

flags

ByteField

0

ingress_node

IP6Field

'::1'

class scapy.layers.inet6.IPv6ExtHdrSegmentRoutingTLVPad1(_pkt, /, *, type=0, len=None, padding=b'\x00')[源代码]

基类:IPv6ExtHdrSegmentRoutingTLV

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |            PADDING            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

               Fig. IPv6ExtHdrSegmentRoutingTLVPad1               
IPv6ExtHdrSegmentRoutingTLVPad1 fields

type

ByteEnumField

0

len

FieldLenField

None

padding

StrLenField

b'\x00'

class scapy.layers.inet6.IPv6ExtHdrSegmentRoutingTLVPadN(_pkt, /, *, type=4, len=None, padding=b'\x00')[源代码]

基类:IPv6ExtHdrSegmentRoutingTLV

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |            PADDING            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

               Fig. IPv6ExtHdrSegmentRoutingTLVPadN               
IPv6ExtHdrSegmentRoutingTLVPadN fields

type

ByteEnumField

4

len

FieldLenField

None

padding

StrLenField

b'\x00'

scapy.layers.inet6.IPv6inIP(dst='203.178.135.36', src=None)[源代码]
class scapy.layers.inet6.Jumbo(_pkt, /, *, otype=194, optlen=4, jumboplen=None)[源代码]

基类:Packet

aliastypes
alignment_delta(curpos)[源代码]
extract_padding(p)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |     OPTLEN    |           JUMBOPLEN           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                            Fig. Jumbo                            
Jumbo fields

otype

_OTypeField

194

optlen

ByteField

4

jumboplen

IntField

None

class scapy.layers.inet6.L3RawSocket6(type=34525, filter=None, iface=None, promisc=None, nofilter=0)[源代码]

基类:L3RawSocket

class scapy.layers.inet6.LifetimeField(name: str, default: int | None)[源代码]

基类:ShortField

i2repr(pkt, x)[源代码]
class scapy.layers.inet6.MIP6MH_BA(_pkt, /, *, nh=59, len=None, mhtype=6, res=None, cksum=None, status=0, flags=<Flag 4 (K)>, res2=None, seq=None, mhtime=0, autopad=1, options=[])[源代码]

基类:_MobilityHeader

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       NH      |      LEN      |     MHTYPE    |      RES      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             CKSUM             |     STATUS    |FLAGS|   RES2  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              SEQ              |             MHTIME            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    AUTOPAD    |            OPTIONS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. MIP6MH_BA                          
MIP6MH_BA fields

nh

ByteEnumField

59

len

ByteField

None

mhtype

ByteEnumField

6

res

ByteField

None

cksum

XShortField

None

status

ByteEnumField

0

flags

FlagsField

<Flag 4 (K)>

res2

XBitField (5 bits)

None

seq

XShortField

None

mhtime

XShortField

0

autopad

_PhantomAutoPadField

1

options

_OptionsField

[]

hashret()[源代码]
class scapy.layers.inet6.MIP6MH_BE(_pkt, /, *, nh=59, len=None, mhtype=7, res=0, cksum=None, status=0, reserved=0, ha='::', options=[])[源代码]

基类:_MobilityHeader

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       NH      |      LEN      |     MHTYPE    |      RES      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             CKSUM             |     STATUS    |    RESERVED   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               HA                              |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            OPTIONS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. MIP6MH_BE                          
MIP6MH_BE fields

nh

ByteEnumField

59

len

ByteField

None

mhtype

ByteEnumField

7

res

ByteField

0

cksum

XShortField

None

status

ByteEnumField

0

reserved

ByteField

0

ha

IP6Field

'::'

options

_OptionsField

[]

class scapy.layers.inet6.MIP6MH_BRR(_pkt, /, *, nh=59, len=None, mhtype=0, res=None, cksum=None, res2=None, autopad=1, options=[])[源代码]

基类:_MobilityHeader

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       NH      |      LEN      |     MHTYPE    |      RES      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             CKSUM             |              RES2             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    AUTOPAD    |            OPTIONS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. MIP6MH_BRR                          
MIP6MH_BRR fields

nh

ByteEnumField

59

len

ByteField

None

mhtype

ByteEnumField

0

res

ByteField

None

cksum

XShortField

None

res2

ShortField

None

autopad

_PhantomAutoPadField

1

options

_OptionsField

[]

hashret()[源代码]
class scapy.layers.inet6.MIP6MH_BU(_pkt, /, *, nh=59, len=None, mhtype=5, res=None, cksum=None, seq=None, flags=<Flag 104 (KHA)>, reserved=0, mhtime=3, autopad=1, options=[])[源代码]

基类:_MobilityHeader

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       NH      |      LEN      |     MHTYPE    |      RES      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             CKSUM             |              SEQ              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    FLAGS    |     RESERVED    |             MHTIME            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    AUTOPAD    |            OPTIONS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. MIP6MH_BU                          
MIP6MH_BU fields

nh

ByteEnumField

59

len

ByteField

None

mhtype

ByteEnumField

5

res

ByteField

None

cksum

XShortField

None

seq

XShortField

None

flags

FlagsField

<Flag 104 (KHA)>

reserved

XBitField (9 bits)

0

mhtime

LifetimeField

3

autopad

_PhantomAutoPadField

1

options

_OptionsField

[]

hashret()[源代码]
class scapy.layers.inet6.MIP6MH_CoT(_pkt, /, *, nh=59, len=None, mhtype=4, res=None, cksum=None, index=None, cookie=b'\x00\x00\x00\x00\x00\x00\x00\x00', token=b'\x00\x00\x00\x00\x00\x00\x00\x00', autopad=1, options=[])[源代码]

基类:MIP6MH_HoT

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       NH      |      LEN      |     MHTYPE    |      RES      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             CKSUM             |             INDEX             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             COOKIE                            |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             TOKEN                             |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    AUTOPAD    |            OPTIONS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. MIP6MH_CoT                          
MIP6MH_CoT fields

nh

ByteEnumField

59

len

ByteField

None

mhtype

ByteEnumField

4

res

ByteField

None

cksum

XShortField

None

index

ShortField

None

cookie

StrFixedLenField

b'\x00\x00\x00\x00\x00\x00\x00\x00'

token

StrFixedLenField

b'\x00\x00\x00\x00\x00\x00\x00\x00'

autopad

_PhantomAutoPadField

1

options

_OptionsField

[]

hashret()[源代码]
class scapy.layers.inet6.MIP6MH_CoTI(_pkt, /, *, nh=59, len=None, mhtype=2, res=None, cksum=None, reserved=b'\x00\x00', cookie=b'\x00\x00\x00\x00\x00\x00\x00\x00', autopad=1, options=[])[源代码]

基类:MIP6MH_HoTI

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       NH      |      LEN      |     MHTYPE    |      RES      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             CKSUM             |            RESERVED           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             COOKIE                            |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    AUTOPAD    |            OPTIONS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. MIP6MH_CoTI                         
MIP6MH_CoTI fields

nh

ByteEnumField

59

len

ByteField

None

mhtype

ByteEnumField

2

res

ByteField

None

cksum

XShortField

None

reserved

StrFixedLenField

b'\x00\x00'

cookie

StrFixedLenField

b'\x00\x00\x00\x00\x00\x00\x00\x00'

autopad

_PhantomAutoPadField

1

options

_OptionsField

[]

hashret()[源代码]
class scapy.layers.inet6.MIP6MH_Generic(_pkt, /, *, nh=59, len=None, mhtype=None, res=None, cksum=None, msg=b'\x00\x00')[源代码]

基类:_MobilityHeader

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       NH      |      LEN      |     MHTYPE    |      RES      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             CKSUM             |              MSG              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. MIP6MH_Generic                        
MIP6MH_Generic fields

nh

ByteEnumField

59

len

ByteField

None

mhtype

ByteEnumField

None

res

ByteField

None

cksum

XShortField

None

msg

StrLenField

b'\x00\x00'

class scapy.layers.inet6.MIP6MH_HoT(_pkt, /, *, nh=59, len=None, mhtype=3, res=None, cksum=None, index=None, cookie=b'\x00\x00\x00\x00\x00\x00\x00\x00', token=b'\x00\x00\x00\x00\x00\x00\x00\x00', autopad=1, options=[])[源代码]

基类:_MobilityHeader

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       NH      |      LEN      |     MHTYPE    |      RES      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             CKSUM             |             INDEX             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             COOKIE                            |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             TOKEN                             |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    AUTOPAD    |            OPTIONS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. MIP6MH_HoT                          
MIP6MH_HoT fields

nh

ByteEnumField

59

len

ByteField

None

mhtype

ByteEnumField

3

res

ByteField

None

cksum

XShortField

None

index

ShortField

None

cookie

StrFixedLenField

b'\x00\x00\x00\x00\x00\x00\x00\x00'

token

StrFixedLenField

b'\x00\x00\x00\x00\x00\x00\x00\x00'

autopad

_PhantomAutoPadField

1

options

_OptionsField

[]

hashret()[源代码]
class scapy.layers.inet6.MIP6MH_HoTI(_pkt, /, *, nh=59, len=None, mhtype=1, res=None, cksum=None, reserved=b'\x00\x00', cookie=b'\x00\x00\x00\x00\x00\x00\x00\x00', autopad=1, options=[])[源代码]

基类:_MobilityHeader

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       NH      |      LEN      |     MHTYPE    |      RES      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             CKSUM             |            RESERVED           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             COOKIE                            |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    AUTOPAD    |            OPTIONS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. MIP6MH_HoTI                         
MIP6MH_HoTI fields

nh

ByteEnumField

59

len

ByteField

None

mhtype

ByteEnumField

1

res

ByteField

None

cksum

XShortField

None

reserved

StrFixedLenField

b'\x00\x00'

cookie

StrFixedLenField

b'\x00\x00\x00\x00\x00\x00\x00\x00'

autopad

_PhantomAutoPadField

1

options

_OptionsField

[]

hashret()[源代码]
class scapy.layers.inet6.MIP6OptAltCoA(_pkt, /, *, otype=3, olen=16, acoa='::')[源代码]

基类:_MIP6OptAlign

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |      OLEN     |              ACOA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. MIP6OptAltCoA                        
MIP6OptAltCoA fields

otype

ByteEnumField

3

olen

ByteField

16

acoa

IP6Field

'::'

x = 8
y = 6
class scapy.layers.inet6.MIP6OptBRAdvice(_pkt, /, *, otype=2, olen=2, rinter=0)[源代码]

基类:_MIP6OptAlign

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |      OLEN     |             RINTER            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. MIP6OptBRAdvice                       
MIP6OptBRAdvice fields

otype

ByteEnumField

2

olen

ByteField

2

rinter

ShortField

0

x = 2
y = 0
class scapy.layers.inet6.MIP6OptBindingAuthData(_pkt, /, *, otype=5, olen=16, authenticator=0)[源代码]

基类:_MIP6OptAlign

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |      OLEN     |         AUTHENTICATOR         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
+                                                               +
|                                                               |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. MIP6OptBindingAuthData                    
MIP6OptBindingAuthData fields

otype

ByteEnumField

5

olen

ByteField

16

authenticator

BitField (96 bits)

0

x = 8
y = 2
class scapy.layers.inet6.MIP6OptCGAParams(_pkt, /, *, otype=12, olen=None, cgaparams=b'')[源代码]

基类:_MIP6OptAlign

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |      OLEN     |           CGAPARAMS           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. MIP6OptCGAParams                       
MIP6OptCGAParams fields

otype

ByteEnumField

12

olen

FieldLenField

None

cgaparams

StrLenField

b''

x = 0
y = 0
class scapy.layers.inet6.MIP6OptCGAParamsReq(_pkt, /, *, otype=11, olen=0)[源代码]

基类:_MIP6OptAlign

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |      OLEN     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. MIP6OptCGAParamsReq                     
MIP6OptCGAParamsReq fields

otype

ByteEnumField

11

olen

ByteField

0

x = 0
y = 0
class scapy.layers.inet6.MIP6OptCareOfTest(_pkt, /, *, otype=16, olen=None, cokt=b'\x00\x00\x00\x00\x00\x00\x00\x00')[源代码]

基类:_MIP6OptAlign

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |      OLEN     |              COKT             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. MIP6OptCareOfTest                      
MIP6OptCareOfTest fields

otype

ByteEnumField

16

olen

FieldLenField

None

cokt

StrLenField

b'\x00\x00\x00\x00\x00\x00\x00\x00'

x = 0
y = 0
class scapy.layers.inet6.MIP6OptCareOfTestInit(_pkt, /, *, otype=15, olen=0)[源代码]

基类:_MIP6OptAlign

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |      OLEN     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. MIP6OptCareOfTestInit                    
MIP6OptCareOfTestInit fields

otype

ByteEnumField

15

olen

ByteField

0

x = 0
y = 0
class scapy.layers.inet6.MIP6OptHomeKeygenToken(_pkt, /, *, otype=14, olen=None, hkt=b'')[源代码]

基类:_MIP6OptAlign

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |      OLEN     |              HKT              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. MIP6OptHomeKeygenToken                    
MIP6OptHomeKeygenToken fields

otype

ByteEnumField

14

olen

FieldLenField

None

hkt

StrLenField

b''

x = 0
y = 0
class scapy.layers.inet6.MIP6OptLLAddr(_pkt, /, *, otype=7, olen=7, ocode=2, pad=0, lla='00:00:00:00:00:00')[源代码]

基类:_MIP6OptAlign

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |      OLEN     |     OCODE     |      PAD      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              LLA                              |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. MIP6OptLLAddr                        
MIP6OptLLAddr fields

otype

ByteEnumField

7

olen

ByteField

7

ocode

ByteEnumField

2

pad

ByteField

0

lla

MACField

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

x = 0
y = 0
class scapy.layers.inet6.MIP6OptMNID(_pkt, /, *, otype=8, olen=None, subtype=1, id=b'')[源代码]

基类:_MIP6OptAlign

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |      OLEN     |    SUBTYPE    |       ID      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                         Fig. MIP6OptMNID                         
MIP6OptMNID fields

otype

ByteEnumField

8

olen

FieldLenField

None

subtype

ByteEnumField

1

id

StrLenField

b''

x = 0
y = 0
class scapy.layers.inet6.MIP6OptMobNetPrefix(_pkt, /, *, otype=6, olen=18, reserved=0, plen=64, prefix='::')[源代码]

基类:_MIP6OptAlign

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |      OLEN     |    RESERVED   |      PLEN     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             PREFIX                            |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. MIP6OptMobNetPrefix                     
MIP6OptMobNetPrefix fields

otype

ByteEnumField

6

olen

ByteField

18

reserved

ByteField

0

plen

ByteField

64

prefix

IP6Field

'::'

x = 8
y = 4
class scapy.layers.inet6.MIP6OptMsgAuth(_pkt, /, *, otype=9, olen=None, subtype=1, mspi=None, authdata=b'AAAAAAAAAAAA')[源代码]

基类:_MIP6OptAlign

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |      OLEN     |    SUBTYPE    |      MSPI     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                               |    AUTHDATA   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                       Fig. MIP6OptMsgAuth                        
MIP6OptMsgAuth fields

otype

ByteEnumField

9

olen

FieldLenField

None

subtype

ByteEnumField

1

mspi

IntField

None

authdata

StrLenField

b'AAAAAAAAAAAA'

x = 4
y = 1
class scapy.layers.inet6.MIP6OptNonceIndices(_pkt, /, *, otype=4, olen=16, hni=0, coni=0)[源代码]

基类:_MIP6OptAlign

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |      OLEN     |              HNI              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              CONI             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. MIP6OptNonceIndices                     
MIP6OptNonceIndices fields

otype

ByteEnumField

4

olen

ByteField

16

hni

ShortField

0

coni

ShortField

0

x = 2
y = 0
class scapy.layers.inet6.MIP6OptReplayProtection(_pkt, /, *, otype=10, olen=8, timestamp=0)[源代码]

基类:_MIP6OptAlign

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |      OLEN     |           TIMESTAMP           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. MIP6OptReplayProtection                   
MIP6OptReplayProtection fields

otype

ByteEnumField

10

olen

ByteField

8

timestamp

NTPTimestampField

0

x = 8
y = 2
class scapy.layers.inet6.MIP6OptSignature(_pkt, /, *, otype=13, olen=None, sig=b'')[源代码]

基类:_MIP6OptAlign

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |      OLEN     |              SIG              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. MIP6OptSignature                       
MIP6OptSignature fields

otype

ByteEnumField

13

olen

FieldLenField

None

sig

StrLenField

b''

x = 0
y = 0
class scapy.layers.inet6.MIP6OptUnknown(_pkt, /, *, otype=6, olen=None, odata=b'')[源代码]

基类:_MIP6OptAlign

aliastypes
classmethod dispatch_hook(_pkt=None, *_, **kargs)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |      OLEN     |             ODATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. MIP6OptUnknown                        
MIP6OptUnknown fields

otype

ByteEnumField

6

olen

FieldLenField

None

odata

StrLenField

b''

x = 0
y = 0
scapy.layers.inet6.NDP_Attack_DAD_DoS_via_NA(iface=None, mac_src_filter=None, tgt_filter=None, reply_mac=None)[源代码]

Perform the DAD DoS attack using NS described in section 4.1.3 of RFC 3756. This is done by listening incoming NS messages sent from the unspecified address and sending a NA reply for the target address, leading the peer to believe that another node is also performing DAD for that address.

By default, the fake NA sent to create the DoS uses:
  • as target address the target address found in received NS.

  • as IPv6 source address: the target address found in received NS.

  • as IPv6 destination address: the link-local solicited-node multicast address derived from the target address in received NS.

  • the mac address of the interface as source (or reply_mac, see below).

  • the multicast mac address derived from the solicited node multicast address used as IPv6 destination address.

  • A Target Link-Layer address option (ICMPv6NDOptDstLLAddr) filled with the mac address used as source of the NA.

Following arguments can be used to change the behavior:

iface: a specific interface (e.g. "eth0") of the system on which the

DoS should be launched. If None is provided conf.iface is used.

mac_src_filter: a mac address (e.g "00:13:72:8c:b5:69") to filter on.

Only NS messages received from this source will trigger replies. This allows limiting the effects of the DoS to a single target by filtering on its mac address. The default value is None: the DoS is not limited to a specific mac address.

tgt_filter: Same as previous but for a specific target IPv6 address for

received NS. If the target address in the NS message (not the IPv6 destination address) matches that address, then a fake reply will be sent, i.e. the emitter will be a target of the DoS.

reply_mac: allow specifying a specific source mac address for the reply,

i.e. to prevent the use of the mac address of the interface. This address will also be used in the Target Link-Layer Address option.

scapy.layers.inet6.NDP_Attack_DAD_DoS_via_NS(iface=None, mac_src_filter=None, tgt_filter=None, reply_mac=None)[源代码]

Perform the DAD DoS attack using NS described in section 4.1.3 of RFC 3756. This is done by listening incoming NS messages sent from the unspecified address and sending a NS reply for the target address, leading the peer to believe that another node is also performing DAD for that address.

By default, the fake NS sent to create the DoS uses:
  • as target address the target address found in received NS.

  • as IPv6 source address: the unspecified address (::).

  • as IPv6 destination address: the link-local solicited-node multicast address derived from the target address in received NS.

  • the mac address of the interface as source (or reply_mac, see below).

  • the multicast mac address derived from the solicited node multicast address used as IPv6 destination address.

Following arguments can be used to change the behavior:

iface: a specific interface (e.g. "eth0") of the system on which the

DoS should be launched. If None is provided conf.iface is used.

mac_src_filter: a mac address (e.g "00:13:72:8c:b5:69") to filter on.

Only NS messages received from this source will trigger replies. This allows limiting the effects of the DoS to a single target by filtering on its mac address. The default value is None: the DoS is not limited to a specific mac address.

tgt_filter: Same as previous but for a specific target IPv6 address for

received NS. If the target address in the NS message (not the IPv6 destination address) matches that address, then a fake reply will be sent, i.e. the emitter will be a target of the DoS.

reply_mac: allow specifying a specific source mac address for the reply,

i.e. to prevent the use of the mac address of the interface.

scapy.layers.inet6.NDP_Attack_Fake_Router(ra, iface=None, mac_src_filter=None, ip_src_filter=None)[源代码]

The purpose of this function is to send provided RA message at layer 2 (i.e. providing a packet starting with IPv6 will not work) in response to received RS messages. In the end, the function is a simple wrapper around sendp() that monitor the link for RS messages.

It is probably better explained with an example:

>>> ra  = Ether()/IPv6()/ICMPv6ND_RA()
>>> ra /= ICMPv6NDOptPrefixInfo(prefix="2001:db8:1::", prefixlen=64)
>>> ra /= ICMPv6NDOptPrefixInfo(prefix="2001:db8:2::", prefixlen=64)
>>> ra /= ICMPv6NDOptSrcLLAddr(lladdr="00:11:22:33:44:55")
>>> NDP_Attack_Fake_Router(ra, iface="eth0")
Fake RA sent in response to RS from fe80::213:58ff:fe8c:b573
Fake RA sent in response to RS from fe80::213:72ff:fe8c:b9ae
...

Following arguments can be used to change the behavior:

ra: the RA message to send in response to received RS message.

iface: a specific interface (e.g. "eth0") of the system on which the

DoS should be launched. If none is provided, conf.iface is used.

mac_src_filter: a mac address (e.g "00:13:72:8c:b5:69") to filter on.

Only RS messages received from this source will trigger a reply. Note that no changes to provided RA is done which imply that if you intend to target only the source of the RS using this option, you will have to set the Ethernet destination address to the same value in your RA. The default value for this parameter is None: no filtering on the source of RS is done.

ip_src_filter: an IPv6 address (e.g. fe80::21e:bff:fe4e:3b2) to filter

on. Only RS messages received from this source address will trigger replies. Same comment as for previous argument apply: if you use the option, you will probably want to set a specific Ethernet destination address in the RA.

scapy.layers.inet6.NDP_Attack_Kill_Default_Router(iface=None, mac_src_filter=None, ip_src_filter=None, reply_mac=None, tgt_mac=None)[源代码]

The purpose of the function is to monitor incoming RA messages sent by default routers (RA with a non-zero Router Lifetime values) and invalidate them by immediately replying with fake RA messages advertising a zero Router Lifetime value.

The result on receivers is that the router is immediately invalidated, i.e. the associated entry is discarded from the default router list and destination cache is updated to reflect the change.

By default, the function considers all RA messages with a non-zero Router Lifetime value but provides configuration knobs to allow filtering RA sent by specific routers (Ethernet source address). With regard to emission, the multicast all-nodes address is used by default but a specific target can be used, in order for the DoS to apply only to a specific host.

More precisely, following arguments can be used to change the behavior:

iface: a specific interface (e.g. "eth0") of the system on which the

DoS should be launched. If None is provided conf.iface is used.

mac_src_filter: a mac address (e.g "00:13:72:8c:b5:69") to filter on.

Only RA messages received from this source will trigger replies. If other default routers advertised their presence on the link, their clients will not be impacted by the attack. The default value is None: the DoS is not limited to a specific mac address.

ip_src_filter: an IPv6 address (e.g. fe80::21e:bff:fe4e:3b2) to filter

on. Only RA messages received from this source address will trigger replies. If other default routers advertised their presence on the link, their clients will not be impacted by the attack. The default value is None: the DoS is not limited to a specific IPv6 source address.

reply_mac: allow specifying a specific source mac address for the reply,

i.e. to prevent the use of the mac address of the interface.

tgt_mac: allow limiting the effect of the DoS to a specific host,

by sending the "invalidating RA" only to its mac address.

scapy.layers.inet6.NDP_Attack_NA_Spoofing(iface=None, mac_src_filter=None, tgt_filter=None, reply_mac=None, router=False)[源代码]

The main purpose of this function is to send fake Neighbor Advertisement messages to a victim. As the emission of unsolicited Neighbor Advertisement is pretty pointless (from an attacker standpoint) because it will not lead to a modification of a victim's neighbor cache, the function send advertisements in response to received NS (NS sent as part of the DAD, i.e. with an unspecified address as source, are not considered).

By default, the fake NA sent to create the DoS uses:
  • as target address the target address found in received NS.

  • as IPv6 source address: the target address

  • as IPv6 destination address: the source IPv6 address of received NS message.

  • the mac address of the interface as source (or reply_mac, see below).

  • the source mac address of the received NS as destination macs address of the emitted NA.

  • A Target Link-Layer address option (ICMPv6NDOptDstLLAddr) filled with the mac address used as source of the NA.

Following arguments can be used to change the behavior:

iface: a specific interface (e.g. "eth0") of the system on which the

DoS should be launched. If None is provided conf.iface is used.

mac_src_filter: a mac address (e.g "00:13:72:8c:b5:69") to filter on.

Only NS messages received from this source will trigger replies. This allows limiting the effects of the DoS to a single target by filtering on its mac address. The default value is None: the DoS is not limited to a specific mac address.

tgt_filter: Same as previous but for a specific target IPv6 address for

received NS. If the target address in the NS message (not the IPv6 destination address) matches that address, then a fake reply will be sent, i.e. the emitter will be a target of the DoS.

reply_mac: allow specifying a specific source mac address for the reply,

i.e. to prevent the use of the mac address of the interface. This address will also be used in the Target Link-Layer Address option.

router: by the default (False) the 'R' flag in the NA used for the reply

is not set. If the parameter is set to True, the 'R' flag in the NA is set, advertising us as a router.

Please, keep the following in mind when using the function: for obvious reasons (kernel space vs. Python speed), when the target of the address resolution is on the link, the sender of the NS receives 2 NA messages in a row, the valid one and our fake one. The second one will overwrite the information provided by the first one, i.e. the natural latency of Scapy helps here.

In practice, on a common Ethernet link, the emission of the NA from the genuine target (kernel stack) usually occurs in the same millisecond as the receipt of the NS. The NA generated by Scapy6 will usually come after something 20+ ms. On a usual testbed for instance, this difference is sufficient to have the first data packet sent from the victim to the destination before it even receives our fake NA.

scapy.layers.inet6.NDP_Attack_NS_Spoofing(src_lladdr=None, src=None, target='2001:db8::1', dst=None, src_mac=None, dst_mac=None, loop=True, inter=1, iface=None)[源代码]

The main purpose of this function is to send fake Neighbor Solicitations messages to a victim, in order to either create a new entry in its neighbor cache or update an existing one. In section 7.2.3 of RFC 4861, it is stated that a node SHOULD create the entry or update an existing one (if it is not currently performing DAD for the target of the NS). The entry's reachability # noqa: E501 state is set to STALE.

The two main parameters of the function are the source link-layer address (carried by the Source Link-Layer Address option in the NS) and the source address of the packet.

Unlike some other NDP_Attack_* function, this one is not based on a stimulus/response model. When called, it sends the same NS packet in loop every second (the default)

Following arguments can be used to change the format of the packets:

src_lladdr: the MAC address used in the Source Link-Layer Address option

included in the NS packet. This is the address that the peer should associate in its neighbor cache with the IPv6 source address of the packet. If None is provided, the mac address of the interface is used.

src: the IPv6 address used as source of the packet. If None is provided,

an address associated with the emitting interface will be used (based on the destination address of the packet).

target: the target address of the NS packet. If no value is provided,

a dummy address (2001:db8::1) is used. The value of the target has a direct impact on the destination address of the packet if it is not overridden. By default, the solicited-node multicast address associated with the target is used as destination address of the packet. Consider specifying a specific destination address if you intend to use a target address different than the one of the victim.

dst: The destination address of the NS. By default, the solicited node

multicast address associated with the target address (see previous parameter) is used if no specific value is provided. The victim is not expected to check the destination address of the packet, so using a multicast address like ff02::1 should work if you want the attack to target all hosts on the link. On the contrary, if you want to be more stealth, you should provide the target address for this parameter in order for the packet to be sent only to the victim.

src_mac: the MAC address used as source of the packet. By default, this

is the address of the interface. If you want to be more stealth, feel free to use something else. Note that this address is not the that the victim will use to populate its neighbor cache.

dst_mac: The MAC address used as destination address of the packet. If

the IPv6 destination address is multicast (all-nodes, solicited node, ...), it will be computed. If the destination address is unicast, a neighbor solicitation will be performed to get the associated address. If you want the attack to be stealth, you can provide the MAC address using this parameter.

loop: By default, this parameter is True, indicating that NS packets

will be sent in loop, separated by 'inter' seconds (see below). When set to False, a single packet is sent.

inter: When loop parameter is True (the default), this parameter provides

the interval in seconds used for sending NS packets.

iface: to force the sending interface.

class scapy.layers.inet6.NIQueryCodeField(name: str, default: int | None, enum: Dict[int, str])[源代码]

基类:ByteEnumField

i2m(pkt, x)[源代码]
class scapy.layers.inet6.NIQueryDataField(name, default)[源代码]

基类:StrField

addfield(pkt, s, val)[源代码]
getfield(pkt, s)[源代码]
h2i(pkt, x)[源代码]
i2h(pkt, x)[源代码]
i2repr(pkt, x)[源代码]
class scapy.layers.inet6.NIReplyDataField(name: str, default: I | None, fmt: str = 'H', remain: int = 0)[源代码]

基类:StrField

addfield(pkt, s, val)[源代码]
getfield(pkt, s)[源代码]
h2i(pkt, x)[源代码]
i2h(pkt, x)[源代码]
i2repr(pkt, x)[源代码]
class scapy.layers.inet6.NTPTimestampField(name: str, default: int)[源代码]

基类:LongField

i2repr(pkt, x)[源代码]
class scapy.layers.inet6.NonceField(name, default=None)[源代码]

基类:StrFixedLenField

class scapy.layers.inet6.Pad1(_pkt, /, *, otype=0)[源代码]

基类:Packet

aliastypes
alignment_delta(curpos)[源代码]
extract_padding(p)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |
+-+-+-+-+-+-+-+-+

                            Fig. Pad1                             
Pad1 fields

otype

_OTypeField

0

class scapy.layers.inet6.PadN(_pkt, /, *, otype=1, optlen=None, optdata=b'')[源代码]

基类:Packet

aliastypes
alignment_delta(curpos)[源代码]
extract_padding(p)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |     OPTLEN    |            OPTDATA            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                            Fig. PadN                             
PadN fields

otype

_OTypeField

1

optlen

FieldLenField

None

optdata

StrLenField

b''

class scapy.layers.inet6.PseudoIPv6(_pkt, /, *, src='::', dst='::', uplen=None, zero=0, nh=0)[源代码]

基类:Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              SRC                              |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              DST                              |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             UPLEN                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      ZERO                     |       NH      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. PseudoIPv6                          
PseudoIPv6 fields

src

IP6Field

'::'

dst

IP6Field

'::'

uplen

IntField

None

zero

BitField (24 bits)

0

nh

ByteField

0

class scapy.layers.inet6.RouterAlert(_pkt, /, *, otype=5, optlen=2, value=None)[源代码]

基类:Packet

aliastypes
alignment_delta(curpos)[源代码]
extract_padding(p)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OTYPE     |     OPTLEN    |             VALUE             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. RouterAlert                         
RouterAlert fields

otype

_OTypeField

5

optlen

ByteField

2

value

ShortEnumField

None

class scapy.layers.inet6.TracerouteResult6(res=None, name='Traceroute', stats=None)[源代码]

基类:TracerouteResult

get_trace()[源代码]
graph(ASres=<scapy.layers.inet6.AS_resolver6 object>, **kargs)[源代码]
show()[源代码]
class scapy.layers.inet6.TruncPktLenField(name: str, default: Packet, cls: Union[Callable[[bytes], Packet], Type[Packet]]  # noqa: E501, length_from: Optional[Callable[[Packet], int]]  # noqa: E501 = None)[源代码]

基类:PacketLenField

i2len(pkt, i)[源代码]
i2m(pkt, x)[源代码]
scapy.layers.inet6.computeNIGroupAddr(name)[源代码]

Compute the NI group Address. Can take a FQDN as input parameter

scapy.layers.inet6.defragment6(packets)[源代码]

Performs defragmentation of a list of IPv6 packets. Packets are reordered. Crap is dropped. What lacks is completed by 'X' characters.

scapy.layers.inet6.dnsrepr2names(x)[源代码]

Take as input a DNS encoded string (possibly compressed) and returns a list of DNS names contained in it. If provided string is already in printable format (does not end with a null character, a one element list is returned). Result is a list.

scapy.layers.inet6.fragment6(pkt, fragSize)[源代码]

Performs fragmentation of an IPv6 packet. 'fragSize' argument is the expected maximum size of fragment data (MTU). The list of packets is returned.

If packet does not contain an IPv6ExtHdrFragment class, it is added to first IPv6 layer found. If no IPv6 layer exists packet is returned in result list unmodified.

scapy.layers.inet6.getmacbyip6(ip6, chainCC=0)[源代码]

Returns the MAC address corresponding to an IPv6 address

neighborCache.get() method is used on instantiated neighbor cache. Resolution mechanism is described in associated doc string.

(chainCC parameter value ends up being passed to sending function

used to perform the resolution, if needed)

scapy.layers.inet6.in6_chksum(nh, u, p)[源代码]

As Specified in RFC 2460 - 8.1 Upper-Layer Checksums

See also .in6_pseudoheader

参数:
  • nh -- value of upper layer protocol

  • u -- upper layer instance (TCP, UDP, ICMPv6*, ). Instance must be provided with all under layers (IPv6 and all extension headers, for example)

  • p -- the payload of the upper layer provided as a string

scapy.layers.inet6.in6_pseudoheader(nh: int, u: IP, plen: int) PseudoIPv6[源代码]

Build an PseudoIPv6 instance as specified in RFC 2460 8.1

This function operates by filling a pseudo header class instance (PseudoIPv6) with: - Next Header value - the address of _final_ destination (if some Routing Header with non segleft field is present in underlayer classes, last address is used.) - the address of _real_ source (basically the source address of an IPv6 class instance available in the underlayer or the source address in HAO option if some Destination Option header found in underlayer includes this option). - the length is the length of provided payload string ('p')

参数:
  • nh -- value of upper layer protocol

  • u -- upper layer instance (TCP, UDP, ICMPv6*, ). Instance must be provided with all under layers (IPv6 and all extension headers, for example)

  • plen -- the length of the upper layer and payload

scapy.layers.inet6.inet6_register_l3(l2, l3)[源代码]
scapy.layers.inet6.names2dnsrepr(x)[源代码]

Take as input a list of DNS names or a single DNS name and encode it in DNS format (with possible compression) If a string that is already a DNS name in DNS format is passed, it is returned unmodified. Result is a string. !!! At the moment, compression is not implemented !!!

scapy.layers.inet6.neighsol(addr, src, iface, timeout=1, chainCC=0)[源代码]

Sends and receive an ICMPv6 Neighbor Solicitation message

This function sends an ICMPv6 Neighbor Solicitation message to get the MAC address of the neighbor with specified IPv6 address address.

'src' address is used as the source IPv6 address of the message. Message is sent on 'iface'. The source MAC address is retrieved accordingly.

By default, timeout waiting for an answer is 1 second.

If no answer is gathered, None is returned. Else, the answer is returned (ethernet frame).

scapy.layers.inet6.traceroute6(target, dport=80, minttl=1, maxttl=30, sport=<RandShort>, l4=None, timeout=2, verbose=None, **kargs)[源代码]

Instant TCP traceroute using IPv6 traceroute6(target, [maxttl=30], [dport=80], [sport=80]) -> None