HOPOPT - IPv6 Hop-by-Hop Options¶
pcapkit.protocols.internet.hopopt contains
HOPOPT
only, which implements extractor for IPv6 Hop-by-Hop
Options header (HOPOPT) *, whose structure is
described as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Next Header |
1 |
8 |
|
Header Extensive Length |
2 |
16 |
|
Options |
-
class
pcapkit.protocols.internet.hopopt.HOPOPT(file=None, length=None, **kwargs)[source]¶ Bases:
pcapkit.protocols.internet.internet.InternetThis class implements IPv6 Hop-by-Hop Options.
-
classmethod
__index__()[source]¶ Numeral registry index of the protocol.
- Returns
Numeral registry index of the protocol in IANA.
- Return type
-
__post_init__(file, length=None, *, extension=False, **kwargs)[source]¶ Post initialisation hook.
- Parameters
file (io.BytesIO) – Source packet stream.
length (Optional[int]) – Length of packet data.
- Keyword Arguments
extension (bool) – If the protocol is used as an IPv6 extension header.
**kwargs – Arbitrary keyword arguments.
See also
For construction argument, please refer to
make().
-
_read_hopopt_options(length)[source]¶ Read HOPOPT options.
- Positional arguments:
length (int): length of options
- Returns
Tuple[Tuple[pcapkit.const.ipv6.option.Option], Dict[str, DataType_Option]]: extracted HOPOPT options
- Raises
ProtocolError – If the threshold is NOT matching.
-
_read_opt_calipso(code, *, desc)[source]¶ Read HOPOPT
CALIPSOoption.Structure of HOPOPT
CALIPSOoption [RFC 5570]:------------------------------------------------------------ | Next Header | Hdr Ext Len | Option Type | Option Length| +-------------+---------------+-------------+--------------+ | CALIPSO Domain of Interpretation | +-------------+---------------+-------------+--------------+ | Cmpt Length | Sens Level | Checksum (CRC-16) | +-------------+---------------+-------------+--------------+ | Compartment Bitmap (Optional; variable length) | +-------------+---------------+-------------+--------------+
- Parameters
code (int) – option type value
- Keyword Arguments
desc (str) – option description
- Returns
parsed option data
- Return type
- Raises
ProtocolError – If the option is malformed.
-
_read_opt_home(code, *, desc)[source]¶ Read HOPOPT Home Address option.
Structure of HOPOPT Home Address option [RFC 6275]:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Option Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Home Address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters
code (int) – option type value
- Keyword Arguments
desc (str) – option description
- Returns
parsed option data
- Return type
- Raises
ProtocolError – If
hopopt.jumbo.lengthis NOT16.
-
_read_opt_ilnp(code, *, desc)[source]¶ Read HOPOPT
ILNPNonce option.Structure of HOPOPT
ILNPNonce option [RFC 6744]: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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | Option Type | Option Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ / Nonce Value / +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
_read_opt_ip_dff(code, *, desc)[source]¶ Read HOPOPT
IP_DFFoption.Structure of HOPOPT
IP_DFFoption [RFC 6971]: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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | OptTypeDFF | OptDataLenDFF | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |VER|D|R|0|0|0|0| Sequence Number | Pad1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters
code (int) – option type value
- Keyword Arguments
desc (str) – option description
- Returns
parsed option data
- Return type
- Raises
ProtocolError – If
hopopt.ip_dff.lengthis NOT2.
-
_read_opt_jumbo(code, *, desc)[source]¶ Read HOPOPT Jumbo Payload option.
Structure of HOPOPT Jumbo Payload option [RFC 2675]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Opt Data Len | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Jumbo Payload Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters
code (int) – option type value
- Keyword Arguments
desc (str) – option description
- Returns
parsed option data
- Return type
- Raises
ProtocolError – If
hopopt.jumbo.lengthis NOT4.
-
_read_opt_lio(code, *, desc)[source]¶ Read HOPOPT Line-Identification option.
Structure of HOPOPT Line-Identification option [RFC 6788]:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Option Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LineIDLen | Line ID... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
_read_opt_mpl(code, *, desc)[source]¶ Read HOPOPT
MPLoption.Structure of HOPOPT
MPLoption [RFC 7731]: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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Opt Data Len | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | S |M|V| rsv | sequence | seed-id (optional) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters
code (int) – option type value
- Keyword Arguments
desc (str) – option description
- Returns
parsed option data
- Return type
- Raises
ProtocolError – If the option is malformed.
-
_read_opt_none(code, *, desc)[source]¶ Read HOPOPT unassigned options.
Structure of HOPOPT unassigned options [RFC 8200]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - - | Option Type | Opt Data Len | Option Data +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
-
_read_opt_pad(code, *, desc)[source]¶ Read HOPOPT padding options.
Structure of HOPOPT padding options [RFC 8200]:
Pad1option:+-+-+-+-+-+-+-+-+ | 0 | +-+-+-+-+-+-+-+-+
PadNoption:+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - - | 1 | Opt Data Len | Option Data +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
- Parameters
code (int) – option type value
- Keyword Arguments
desc (str) – option description
- Returns
parsed option data
- Return type
Union[DataType_Opt_Pad1, DataType_Opt_PadN]
- Raises
ProtocolError – If
codeis NOT0or1.
-
_read_opt_pdm(code, *, desc)[source]¶ Read HOPOPT
PDMoption.Structure of HOPOPT
PDMoption [RFC 8250]: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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Option Length | ScaleDTLR | ScaleDTLS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PSN This Packet | PSN Last Received | |-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Delta Time Last Received | Delta Time Last Sent | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters
code (int) – option type value
- Keyword Arguments
desc (str) – option description
- Returns
parsed option data
- Return type
- Raises
ProtocolError – If
hopopt.pdm.lengthis NOT10.
-
_read_opt_qs(code, *, desc)[source]¶ Read HOPOPT Quick Start option.
Structure of HOPOPT Quick-Start option [RFC 4782]:
A Quick-Start Request:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option | Length=6 | Func. | Rate | QS TTL | | | | 0000 |Request| | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | QS Nonce | R | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Report of Approved Rate:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option | Length=6 | Func. | Rate | Not Used | | | | 1000 | Report| | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | QS Nonce | R | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters
code (int) – option type value
- Keyword Arguments
desc (str) – option description
- Returns
parsed option data
- Return type
- Raises
ProtocolError – If the option is malformed.
-
_read_opt_ra(code, *, desc)[source]¶ Read HOPOPT Router Alert option.
Structure of HOPOPT Router Alert option [RFC 2711]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0 0 0|0 0 1 0 1|0 0 0 0 0 0 1 0| Value (2 octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters
code (int) – option type value
- Keyword Arguments
desc (str) – option description
- Returns
parsed option data
- Return type
- Raises
ProtocolError – If
hopopt.tun.lengthis NOT2.
-
_read_opt_rpl(code, *, desc)[source]¶ Read HOPOPT
RPLoption.Structure of HOPOPT
RPLoption [RFC 6553]: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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Opt Data Len | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |O|R|F|0|0|0|0|0| RPLInstanceID | SenderRank | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | (sub-TLVs) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters
code (int) – option type value
- Keyword Arguments
desc (str) – option description
- Returns
parsed option data
- Return type
- Raises
ProtocolError – If
hopopt.rpl.lengthis LESS THAN4.
-
_read_opt_smf_dpd(code, *, desc)[source]¶ Read HOPOPT
SMF_DPDoption.Structure of HOPOPT
SMF_DPDoption [RFC 5570]:IPv6
SMF_DPDoption header in I-DPD mode0 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... |0|0|0| 01000 | Opt. Data Len | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0|TidTy| TidLen| TaggerID (optional) ... | +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | Identifier ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+IPv6
SMF_DPDoption header in H-DPD mode0 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... |0|0|0| OptType | Opt. Data Len | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1| Hash Assist Value (HAV) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters
code (int) – option type value
- Keyword Arguments
desc (str) – option description
- Returns
parsed option data
- Return type
- Raises
ProtocolError – If the option is malformed.
-
_read_opt_tun(code, *, desc)[source]¶ Read HOPOPT Tunnel Encapsulation Limit option.
Structure of HOPOPT Tunnel Encapsulation Limit option [RFC 2473]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header |Hdr Ext Len = 0| Opt Type = 4 |Opt Data Len=1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Tun Encap Lim |PadN Opt Type=1|Opt Data Len=1 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters
code (int) – option type value
- Keyword Arguments
desc (str) – option description
- Returns
parsed option data
- Return type
- Raises
ProtocolError – If
hopopt.tun.lengthis NOT1.
-
_read_opt_type(kind)[source]¶ Read option type field.
- Parameters
kind (int) – option kind value
- Returns
extracted HOPOPT option type field
- Return type
-
make(**kwargs)[source]¶ Make (construct) packet data.
- Keyword Arguments
**kwargs – Arbitrary keyword arguments.
- Returns
Constructed packet data.
- Return type
-
read(length=None, *, extension=False, **kwargs)[source]¶ Read IPv6 Hop-by-Hop Options.
Structure of HOPOPT header [RFC 8200]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | . . . Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
property
name¶ Name of current protocol.
- Return type
Literal[‘IPv6 Hop-by-Hop Options’]
-
property
payload¶ Payload of current instance.
- Raises
UnsupportedCall – if the protocol is used as an IPv6 extension header
- Return type
-
property
protocol¶ Name of next layer protocol.
- Return type
-
classmethod
-
pcapkit.protocols.internet.hopopt._HOPOPT_ACT: Dict[str, str]¶ HOPOPT unknown option actions.
Code
Action
00skip over this option and continue processing the header
01discard the packet
10discard the packet and, regardless of whether or not the packet’s Destination Address was a multicast address, send an ICMP Parameter Problem, Code 2, message to the packet’s Source Address, pointing to the unrecognized Option Type
11discard the packet and, only if the packet’s Destination Address was not a multicast address, send an ICMP Parameter Problem, Code 2, message to the packet’s Source Address, pointing to the unrecognized Option Type
-
pcapkit.protocols.internet.hopopt._HOPOPT_OPT: Dict[int, Tuple[str, str]]¶ HOPOPT options.
Code
Acronym
Option
Reference
0x00
padPad1
[RFC 8200] 0
0x01
padPadN
[RFC 8200]
0x04
tunTunnel Encapsulation Limit
[RFC 2473] 1
0x05
raRouter Alert
[RFC 2711] 2
0x07
calipsoCommon Architecture Label IPv6 Security Option
[RFC 5570]
0x08
smf_dpdSimplified Multicast Forwarding
[RFC 6621]
0x0F
pdmPerformance and Diagnostic Metrics
[RFC 8250] 10
0x26
qsQuick-Start
[RFC 4782][RFC Errata 2034] 6
0x63
rplRouting Protocol for Low-Power and Lossy Networks
[RFC 6553]
0x6D
mplMulticast Protocol for Low-Power and Lossy Networks
[RFC 7731]
0x8B
ilnpIdentifier-Locator Network Protocol Nonce
[RFC 6744]
0x8C
lioLine-Identification Option
[RFC 6788]
0xC2
jumboJumbo Payload
[RFC 2675]
0xC9
homeHome Address
[RFC 6275]
0xEE
ip_dffDepth-First Forwarding
[RFC 6971]
-
pcapkit.protocols.internet.hopopt._HOPOPT_NULL: Dict[int, str]¶ HOPOPT unknown option descriptions.
Code
Description
Reference
0x1E
RFC3692-style Experiment
[RFC 4727]
0x3E
RFC3692-style Experiment
[RFC 4727]
0x4D
Deprecated
[RFC 7731]
0x5E
RFC3692-style Experiment
[RFC 4727]
0x7E
RFC3692-style Experiment
[RFC 4727]
0x8A
Endpoint Identification
DEPRECATED
0x9E
RFC3692-style Experiment
[RFC 4727]
0xBE
RFC3692-style Experiment
[RFC 4727]
0xDE
RFC3692-style Experiment
[RFC 4727]
0xFE
RFC3692-style Experiment
[RFC 4727]
Data Structure¶
Important
Following classes are only for documentation purpose.
They do NOT exist in the pcapkit module.
-
class
pcapkit.protocols.internet.hopopt.DataType_HOPOPT¶ - Bases
TypedDict
Structure of HOPOPT header [RFC 8200].
-
next: pcapkit.const.reg.transtype.TransType¶ Next header.
-
options: Tuple[pcapkit.const.ipv6.option.Option]¶ Array of option acronyms.
-
-
class
pcapkit.protocols.internet.hopopt.DataType_Option¶ - Bases
TypedDict
HOPOPT option.
-
type: DataType_Option_Type¶ Option type.
HOPOPT Option Type¶
For HOPOPT option type field as described in RFC 791, its structure is described as below:
Octets |
Bits |
Name |
Descriptions |
|---|---|---|---|
0 |
0 |
|
Option Number |
0 |
0 |
|
Action ( |
0 |
2 |
|
Change Flag ( |
HOPOPT Unassigned Options¶
For HOPOPT unassigned options as described in RFC 8200, its structure is described as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Option Type |
0 |
0 |
|
Option Number |
0 |
0 |
|
Action ( |
0 |
2 |
|
Change Flag ( |
1 |
8 |
|
Length of Option Data |
2 |
16 |
|
Option Data |
HOPOPT Padding Options¶
Pad1 Option¶
For HOPOPT Pad1 option as described in RFC 8200,
its structure is described as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Option Type |
0 |
0 |
|
Option Number |
0 |
0 |
|
Action ( |
0 |
2 |
|
Change Flag ( |
PadN Option¶
For HOPOPT PadN option as described in RFC 8200,
its structure is described as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Option Type |
0 |
0 |
|
Option Number |
0 |
0 |
|
Action ( |
0 |
2 |
|
Change Flag ( |
1 |
8 |
|
Length of Option Data |
2 |
16 |
|
Padding |
HOPOPT Tunnel Encapsulation Limit Option¶
For HOPOPT Tunnel Encapsulation Limit option as described in RFC 2473, its structure is described as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Option Type |
0 |
0 |
|
Option Number |
0 |
0 |
|
Action ( |
0 |
2 |
|
Change Flag ( |
1 |
8 |
|
Length of Option Data |
2 |
16 |
|
Tunnel Encapsulation Limit |
HOPOPT Router Alert Option¶
For HOPOPT Router Alert option as described in RFC 2711, its structure is described as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Option Type |
0 |
0 |
|
Option Number |
0 |
0 |
|
Action ( |
0 |
2 |
|
Change Flag ( |
1 |
8 |
|
Length of Option Data |
2 |
16 |
|
Value |
HOPOPT CALIPSO Option¶
For HOPOPT CALIPSO option as described in RFC 5570,
its structure is described as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Option Type |
0 |
0 |
|
Option Number |
0 |
0 |
|
Action (00) |
0 |
2 |
|
Change Flag (0) |
1 |
8 |
|
Length of Option Data |
2 |
16 |
|
CALIPSO Domain of Interpretation |
6 |
48 |
|
Cmpt Length |
7 |
56 |
|
Sens Level |
8 |
64 |
|
Checksum (CRC-16) |
9 |
72 |
|
Compartment Bitmap |
HOPOPT SMF_DPD Option¶
I-DPD Mode¶
For IPv6 SMF_DPD option header in I-DPD mode as described in RFC 5570,
its structure is described as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Option Type |
0 |
0 |
|
Option Number |
0 |
0 |
|
Action ( |
0 |
2 |
|
Change Flag ( |
1 |
8 |
|
Length of Option Data |
2 |
16 |
|
DPD Type ( |
2 |
17 |
|
TaggerID Type |
2 |
20 |
|
TaggerID Length |
3 |
24 |
|
TaggerID |
? |
? |
|
Identifier |
-
class
pcapkit.protocols.internet.hopopt.DataType_Opt_SMF_I_PDP¶ - Bases
DataType_Option
Structure of HOPOPT
SMF_DPDoption in I-DPD mode [RFC 5570].-
dpd_type: Literal[‘I-DPD’]¶ DPD type.
-
tid_type: pcapkit.const.ipv6.tagger_id.TaggerID¶ TaggerID type.
H-DPD Mode¶
For IPv6 SMF_DPD option header in H-DPD mode as described in RFC 5570,
its structure is described as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Option Type |
0 |
0 |
|
Option Number |
0 |
0 |
|
Action ( |
0 |
2 |
|
Change Flag ( |
1 |
8 |
|
Length of Option Data |
2 |
16 |
|
DPD Type ( |
2 |
17 |
|
Hash Assist Value |
HOPOPT PDM Option¶
For HOPOPT PDM option as described in RFC 8250,
its structure is described as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Option Type |
0 |
0 |
|
Option Number |
0 |
0 |
|
Action ( |
0 |
2 |
|
Change Flag ( |
1 |
8 |
|
Length of Option Data |
2 |
16 |
|
Scale Delta Time Last Received |
3 |
24 |
|
Scale Delta Time Last Sent |
4 |
32 |
|
Packet Sequence Number This Packet |
6 |
48 |
|
Packet Sequence Number Last Received |
8 |
64 |
|
Delta Time Last Received |
10 |
80 |
|
Delta Time Last Sent |
-
class
pcapkit.protocols.internet.hopopt.DataType_Opt_PDM¶ - Bases
DataType_Option
Structure of HOPOPT
PDMoption [RFC 8250].-
scaledtlr: datetime.timedelta¶ Scale delta time last received.
-
scaledtls: datetime.timedelta¶ Scale delta time last sent.
-
deltatlr: datetime.timedelta¶ Delta time last received.
-
deltatls: datetime.timedelta¶ Delta time last sent.
HOPOPT Quick Start Option¶
For HOPOPT Quick Start option as described in RFC 4782, its structure is described as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Option Type |
0 |
0 |
|
Option Number |
0 |
0 |
|
Action ( |
0 |
2 |
|
Change Flag ( |
1 |
8 |
|
Length of Option Data |
2 |
16 |
|
Function ( |
2 |
20 |
|
Rate Request / Report (in Kbps) |
3 |
24 |
|
QS TTL / |
4 |
32 |
|
QS Nounce |
7 |
62 |
Reserved |
HOPOPT RPL Option¶
For HOPOPT RPL option as described in RFC 6553,
its structure is described as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Option Type |
0 |
0 |
|
Option Number |
0 |
0 |
|
Action ( |
0 |
2 |
|
Change Flag ( |
1 |
8 |
|
Length of Option Data |
2 |
16 |
|
RPL Option Flags |
2 |
16 |
|
Down Flag |
2 |
17 |
|
Rank-Error Flag |
2 |
18 |
|
Forwarding-Error Flag |
3 |
24 |
|
RPL Instance ID |
4 |
32 |
|
SenderRank |
6 |
48 |
|
Sub-TLVs |
HOPOPT MPL Option¶
For HOPOPT MPL option as described in RFC 7731,
its structure is described as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Option Type |
0 |
0 |
|
Option Number |
0 |
0 |
|
Action ( |
0 |
2 |
|
Change Flag ( |
1 |
8 |
|
Length of Option Data |
2 |
16 |
|
Seed-ID Length |
2 |
18 |
|
MPL Option Flags |
2 |
18 |
|
Maximum SEQ Flag |
2 |
19 |
|
Verification Flag |
2 |
20 |
Reserved |
|
3 |
24 |
|
Sequence |
4 |
32 |
|
Seed-ID |
-
class
pcapkit.protocols.internet.hopopt.DataType_Opt_MPL¶ - Bases
DataType_Option
Structure of HOPOPT
MPLoption [RFC 7731].-
seed_len: pcapkit.const.ipv6.seed_id.SeedID¶ Seed-ID length.
-
flags: DataType_MPL_Flags¶ MPL option flags.
HOPOPT ILNP Nounce Option¶
For HOPOPT ILNP Nounce option as described in RFC 6744,
its structure is described as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Option Type |
0 |
0 |
|
Option Number |
0 |
0 |
|
Action ( |
0 |
2 |
|
Change Flag ( |
1 |
8 |
|
Length of Option Data |
2 |
16 |
|
Nonce Value |
HOPOPT Line-Identification Option¶
For HOPOPT Line-Identification option as described in RFC 6788, its structure is described as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Option Type |
0 |
0 |
|
Option Number |
0 |
0 |
|
Action ( |
0 |
2 |
|
Change Flag ( |
1 |
8 |
|
Length of Option Data |
2 |
16 |
|
Line ID Length |
3 |
24 |
|
Line ID |
HOPOPT Jumbo Payload Option¶
For HOPOPT Jumbo Payload option as described in RFC 2675, its structure is described as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Option Type |
0 |
0 |
|
Option Number |
0 |
0 |
|
Action ( |
0 |
2 |
|
Change Flag ( |
1 |
8 |
|
Length of Option Data |
2 |
16 |
|
Jumbo Payload Length |
HOPOPT Home Address Option¶
For HOPOPT Home Address option as described in RFC 6275, its structure is described as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Option Type |
0 |
0 |
|
Option Number |
0 |
0 |
|
Action ( |
0 |
2 |
|
Change Flag ( |
1 |
8 |
|
Length of Option Data |
2 |
16 |
|
Home Address |
-
class
pcapkit.protocols.internet.hopopt.DataType_Opt_Home¶ - Bases
DataType_Option
Structure of HOPOPT Home Address option [RFC 6275].
-
ip: ipaddress.IPv6Address¶ Home address.
HOPOPT IP_DFF Option¶
For HOPOPT IP_DFF option as described in RFC 6971,
its structure is described as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Option Type |
0 |
0 |
|
Option Number |
0 |
0 |
|
Action ( |
0 |
2 |
|
Change Flag ( |
1 |
8 |
|
Length of Option Data |
2 |
16 |
|
Version |
2 |
18 |
|
Flags |
2 |
18 |
|
|
2 |
19 |
|
|
2 |
20 |
Reserved |
|
3 |
24 |
|
Sequence Number |
-
class
pcapkit.protocols.internet.hopopt.DataType_Opt_IP_DFF¶ - Bases
DataType_Option
Structure of HOPOPT
IP_DFFoption [RFC 6971].-
flags: DataType_IP_DFF_Flags¶ Flags.
-
class
pcapkit.protocols.internet.hopopt.DataType_IP_DFF_Flags¶ - Bases
TypedDict
Flags.