IPv6-Opts - Destination Options for IPv6¶
pcapkit.protocols.internet.ipv6_opts contains
IPv6_Opts
only, which implements extractor for Destination Options
for IPv6 (IPv6-Opts) [*], whose structure is described
as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Next Header |
1 |
8 |
|
Header Extension Length |
2 |
16 |
|
Options |
- class pcapkit.protocols.internet.ipv6_opts.IPv6_Opts(file=None, length=None, **kwargs)[source]¶
Bases:
IPv6_Ext[IPv6_Opts,IPv6_Opts]This class implements Destination Options for IPv6.
This class parses the following IPv6 destination options, which are registered in the
self.__option__attribute:Option Code
Option Parser
Option Constructor
Changed in version 1.5.0:
The ILNP nonce is sized with a ceiling rather than a floor (#601).
The RPL option keeps its reserved flag bits on rebuild and accepts RFC 6553 sub-TLVs (#1199).
A rebuild reproduces the option area byte for byte: its padding, a PadN with no data, the SMF_DPD, CALIPSO, PDM and ILNP Nonce options, and unassigned Quick-Start function codes (#1200, #1228, #1229, #1232 to #1234, #1237); a CALIPSO option keeps its trailing pad and its length (#1403).
The MPL,
IP_DFFand Quick-Start options keep their reserved bits on rebuild, andIP_DFFtakes theOpt Data Lenof3that RFC 6971 Errata ID 3937 gives, where it took2(#1235).A PadN option’s data and the “Not Used” octet of a Quick-Start report are kept as captured rather than zeroed (#1223).
- property payload: ProtocolBase | NoReturn¶
Payload of current instance.
- Raises:
UnsupportedCall – if the protocol is used as an IPv6 extension header
- Return type:
- property protocol: str | None | NoReturn¶
Name of next layer protocol (if any).
- Raises:
UnsupportedCall – if the protocol is used as an IPv6 extension header
- property protochain: ProtoChain | NoReturn¶
Protocol chain of current instance.
- Raises:
UnsupportedCall – if the protocol is used as an IPv6 extension header
- classmethod register_option(code, meth)[source]¶
Register an option parser.
- read(length=None, *, extension=False, **kwargs)[source]¶
Read Destination Options for IPv6.
Structure of IPv6-Opts header [RFC 8200]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | . . . Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- make(next=<TransType.UDP: 17>, next_default=None, next_namespace=None, next_reversed=False, options=None, payload=b'', **kwargs)[source]¶
Make (construct) packet data.
- Parameters:
next (
TransType|IntEnum|IntEnum|str|int) – Next header type.next_default (
int|None) – Default value of next header type.next_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Namespace of next header type.next_reversed (
bool) – If the namespace of next header type is reversed.options (
list[Option|tuple[Option,dict[str,Any]] |bytes] |OrderedMultiDict[Option,Option] |None) – Destination Options.payload (
bytes|ProtocolBase|Schema) – Payload of current protocol.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed packet data.
- _read_ipv6_opts(length)[source]¶
Read IPv6-Opts options.
- Positional arguments:
length: length of options
- Return type:
- Returns:
Extracted IPv6-Opts options
- Raises:
ProtocolError – If the parsed options do not total exactly
lengthoctets.
- _read_opt_none(schema, *, options)[source]¶
Read IPv6-Opts unassigned options.
Structure of IPv6-Opts unassigned options [RFC 8200]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - - | Option Type | Opt Data Len | Option Data +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
- Parameters:
schema (
UnassignedOption) – parsed parameter schemaoptions (
OrderedMultiDict[Option,Option]) – extracted IPv6-Opts options
- Return type:
- Returns:
Parsed option data.
- _read_opt_pad(schema, *, options)[source]¶
Read IPv6-Opts padding options.
Structure of IPv6-Opts padding options [RFC 8200]:
Pad1option:+-+-+-+-+-+-+-+-+ | 0 | +-+-+-+-+-+-+-+-+
PadNoption:+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - - | 1 | Opt Data Len | Option Data +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
- Parameters:
schema (
PadOption) – parsed parameter schemaoptions (
OrderedMultiDict[Option,Option]) – extracted IPv6-Opts options
- Return type:
- Returns:
Parsed option data.
- Raises:
ProtocolError – If
codeis NOT0or1.
Note
A
Pad1option occupies a single octet and carries noOpt Data Lenfield, so itslengthis1rather thanlen + 2. That one-octet wire shape is enforced byPadOptionitself, which sizes both the length octet and the padding data from the option type;clenis therefore always0here for a parsedPad1, and the check below only guards a schema built by hand. APadNwhoseOpt Data Lenis0is a valid two-octet padding option [RFC 8200 Section 4.2].
- _read_opt_tun(schema, *, options)[source]¶
Read IPv6-Opts Tunnel Encapsulation Limit option.
Structure of IPv6-Opts Tunnel Encapsulation Limit option [RFC 2473]:
Option Type Opt Data Len Opt Data Len 0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0 0 0 0 0 1 0 0| 1 | Tun Encap Lim | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters:
schema (
TunnelEncapsulationLimitOption) – parsed parameter schemaoptions (
OrderedMultiDict[Option,Option]) – extracted IPv6-Opts options
- Return type:
- Returns:
Parsed option data.
- Raises:
ProtocolError – If
schema.lenis NOT1.
- _read_opt_ra(schema, *, options)[source]¶
Read IPv6-Opts Router Alert option.
Structure of IPv6-Opts 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:
schema (
RouterAlertOption) – parsed parameter schemaoptions (
OrderedMultiDict[Option,Option]) – extracted IPv6-Opts options
- Return type:
- Returns:
Parsed option data.
- Raises:
ProtocolError – If
schema.lenis NOT2.
- _read_opt_calipso(schema, *, options)[source]¶
Read IPv6-Opts Common Architecture Label IPv6 Security Option (CALIPSO) option.
Structure of IPv6-Opts CALIPSO option [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:
schema (
CALIPSOOption) – parsed parameter schemaoptions (
OrderedMultiDict[Option,Option]) – extracted IPv6-Opts options
- Return type:
- Returns:
Parsed option data.
- Raises:
ProtocolError – If the option is malformed.
- _read_opt_smf_dpd(schema, *, options)[source]¶
Read IPv6-Opts Simplified Multicast Forwarding Duplicate Packet Detection (
SMF_DPD) option.Structure of IPv6-Opts
SMF_DPDoption [RFC 6621]:IPv6
SMF_DPDoption header in I-DPD (Identification-Based 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 (Hash-Based) 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:
schema (
SMFDPDOption) – parsed parameter schemaoptions (
OrderedMultiDict[Option,Option]) – extracted IPv6-Opts options
- Return type:
- Returns:
Parsed option data.
- Raises:
ProtocolError – If the option is malformed.
- _read_opt_pdm(schema, *, options)[source]¶
Read IPv6-Opts Performance and Diagnostic Metrics (PDM) option.
Structure of IPv6-Opts PDM option [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:
schema (
PDMOption) – parsed parameter schemaoptions (
OrderedMultiDict[Option,Option]) – extracted IPv6-Opts options
- Return type:
- Returns:
Parsed option data.
- Raises:
ProtocolError – If
schema.lenis NOT10.
- _read_opt_qs(schema, *, options)[source]¶
Read IPv6-Opts Quick Start option.
Structure of IPv6-Opts 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:
schema (
QuickStartOption) – parsed parameter schemaoptions (
OrderedMultiDict[Option,Option]) – extracted IPv6-Opts options
- Return type:
- Returns:
Parsed option data.
- Raises:
ProtocolError – If the option is malformed.
Note
An option whose QS function is neither of the two above has no defined layout, so the schema keeps it as an unassigned option and it is parsed as one, c.f.
_read_opt_none().
- _read_opt_rpl(schema, *, options)[source]¶
Read IPv6-Opts Routing Protocol for Low-Power and Lossy Networks (RPL) option.
Structure of IPv6-Opts RPL option [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) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+The sub-TLVs, which RFC 6553 Section 3 says MUST be skipped when unrecognised, are kept as raw octets in
sub_tlvs.- Parameters:
schema (
RPLOption) – parsed parameter schemaoptions (
OrderedMultiDict[Option,Option]) – extracted IPv6-Opts options
- Return type:
- Returns:
Parsed option data.
- Raises:
ProtocolError – If
schema.lenis less than4.
- _read_opt_mpl(schema, *, options)[source]¶
Read IPv6-Opts Multicast Protocol for Low-Power and Lossy Networks (MPL) option.
Structure of IPv6-Opts MPL option [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:
schema (
MPLOption) – parsed parameter schemaoptions (
OrderedMultiDict[Option,Option]) – extracted IPv6-Opts options
- Return type:
- Returns:
Parsed option data.
- Raises:
ProtocolError – If the option is malformed.
- _read_opt_ilnp(schema, *, options)[source]¶
Read IPv6-Opts Identifier-Locator Network Protocol (ILNP) Nonce option.
Structure of IPv6-Opts ILNP Nonce 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 / +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters:
schema (
ILNPOption) – parsed parameter schemaoptions (
OrderedMultiDict[Option,Option]) – extracted IPv6-Opts options
- Return type:
- Returns:
Parsed option data.
- _read_opt_lio(schema, *, options)[source]¶
Read IPv6-Opts Line-Identification option.
Structure of IPv6-Opts 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... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
LineIdentificationOption) – parsed parameter schemaoptions (
OrderedMultiDict[Option,Option]) – extracted IPv6-Opts options
- Return type:
- Returns:
Parsed option data.
- _read_opt_jumbo(schema, *, options)[source]¶
Read IPv6-Opts Jumbo Payload option.
Structure of IPv6-Opts Jumbo Payload option [RFC 2675]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Opt Data Len | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Jumbo Payload Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
JumboPayloadOption) – parsed parameter schemaoptions (
OrderedMultiDict[Option,Option]) – extracted IPv6-Opts options
- Return type:
- Returns:
Parsed option data.
- Raises:
ProtocolError – If
schema.lenis NOT4.
- _read_opt_home(schema, *, options)[source]¶
Read IPv6-Opts Home Address option.
Structure of IPv6-Opts 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:
schema (
HomeAddressOption) – parsed parameter schemaoptions (
OrderedMultiDict[Option,Option]) – extracted IPv6-Opts options
- Return type:
- Returns:
Parsed option data.
- Raises:
ProtocolError – If
schema.lenis NOT16.
- _read_opt_ip_dff(schema, *, options)[source]¶
Read IPv6-Opts Depth-First Forwarding (
IP_DFF) option.Structure of IPv6-Opts
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
OptDataLenDFFis3, the flags octet and the sequence number, as corrected by RFC 6971 Errata ID 3937; the RFC text says2.- Parameters:
schema (
IPDFFOption) – parsed parameter schemaoptions (
OrderedMultiDict[Option,Option]) – extracted IPv6-Opts options
- Return type:
- Returns:
Parsed option data.
- Raises:
ProtocolError – If
schema.lenis NOT3.
- _make_ipv6_opts(options)[source]¶
Make options for IPv6-Opts.
- Parameters:
options (
list[Option|tuple[Option,dict[str,Any]] |bytes] |OrderedMultiDict[Option,Option]) – IPv6-Opts options- Return type:
- Returns:
Tuple of options and total length of options.
Note
Options given as a
listare fresh input: padding options in it are dropped, and padding is inserted after each option to align the header. Options given as anOrderedMultiDict, i.e. parsed data, are emitted in order with their own padding options kept, and padding is added only at the end if the header is not aligned.The returned length is that of the options area alone, so it is the value
make()needs forhdr_ext_len. Since the two octets of the fixed header precede it, an options area is well formed only when it is 6 octets short of a multiple of 8 – including when it holds no real options at all, in which case it is 6 octets of pure padding rather than empty.
- _make_opt_none(code, opt=None, *, data=b'', **kwargs)[source]¶
Make IPv6-Opts unassigned option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
- _make_opt_pad(code, opt=None, *, length=0, pad=b'', **kwargs)[source]¶
Make IPv6-Opts pad option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
Note
Data_PadOption.lengthcounts the whole option, whereasSchema_PadOption.lenis theOpt Data Lenfield: two octets fewer, and absent altogether for aPad1.optis honoured so that re-making a parsed padding option keeps its type and size. APadNwithlength0is a valid two-octet option [RFC 8200 Section 4.2] and is kept.
- _make_opt_tun(code, opt=None, *, limit=0, **kwargs)[source]¶
Make IPv6-Opts tunnel encapsulation limit option.
- Parameters:
code (
Option) – option type valueopt (
TunnelEncapsulationLimitOption|None) – option datalimit (
int) – tunnel encapsulation limit**kwargs (
Any) – arbitrary keyword arguments
- Return type:
- Returns:
Constructed option schema.
- _make_opt_ra(code, opt=None, *, alert=<RouterAlert.Datagram_contains_a_Multicast_Listener_Discovery_message: 0>, alert_default=None, alert_namespace=None, alert_reversed=False, **kwargs)[source]¶
Make IPv6-Opts router alert option.
- Parameters:
code (
Option) – option type valueopt (
RouterAlertOption|None) – option dataalert (
RouterAlert|IntEnum|IntEnum|str|int) – router alert valuealert_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – namespace of router alertalert_reversed (
bool) – reversed flag of router alert**kwargs (
Any) – arbitrary keyword arguments
- Return type:
- Returns:
Constructed option schema.
- _make_opt_calipso(code, opt=None, *, domain=0, level=0, checksum=b'\\x00\\x00', bitmap=None, pad=b'', **kwargs)[source]¶
Make IPv6-Opts calipso option.
- Parameters:
code (
Option) – option type valueopt (
CALIPSOOption|None) – option datadomain (
int) – CALIPSO domain of interpretationlevel (
int) – sensitivity levelchecksum (
bytes) – checksum of the optionbitmap (
bytes|tuple[int,...] |None) – compartment bitmap, as a bytes-like object or as an iterable of octets, such as thetuplethe reader stores; its length must be a multiple of 4 octetspad (
bytes) – octets after the compartment bitmap, counted inOpt Data Len**kwargs (
Any) – arbitrary keyword arguments
- Return type:
- Returns:
Constructed option schema.
- Raises:
ProtocolError – If the bitmap is not bytes-like or an iterable of octets, or is not a whole number of 32-bit words, if
padis notbytes, or if the option data would exceed the 255 octetsOpt Data Lencan count.
Note
Cmpt Lengthon the wire counts 32-bit words [RFC 5570 Section 5.1], whereas the bitmap here is sized in octets.
- _make_opt_smf_dpd(code, opt=None, *, mode=<SMFDPDMode.I_DPD: 0>, mode_default=None, mode_namespace=None, mode_reversed=False, tid_type=None, tid_type_default=None, tid_type_namespace=None, tid_type_reversed=False, tid=None, id=b'', hav=b'', **kwargs)[source]¶
Make IPv6-Opts SMF DPD option.
- Parameters:
code (
Option) – option type valueopt (
SMFIdentificationBasedDPDOption|SMFHashBasedDPDOption|None) – option datamode (
SMFDPDMode|IntEnum|IntEnum|str|int) – DPD modemode_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – namespace of DPD modemode_reversed (
bool) – reversed flag of DPD modetid_type (
TaggerID|IntEnum|IntEnum|str|int|None) – TaggerID type (TidTyfield); inferred from the length oftidif not giventid_type_default (
int|None) – default value of TaggerID typetid_type_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – namespace of TaggerID typetid_type_reversed (
bool) – reversed flag of TaggerID typetid (
bytes|IPv4Address|IPv6Address|None) – Tagger IDid (
bytes) – identifierhav (
bytes) – hash assist value (HAV)**kwargs (
Any) – arbitrary keyword arguments
- Return type:
- Returns:
Constructed option schema.
- Raises:
ProtocolError – If the DPD mode is invalid, the Tagger ID does not fit the TaggerID type, or the H-DPD Hash Assist Value is empty.
- _make_opt_pdm(code, opt=None, *, psntp=0, psnlr=0, deltatlr=0, deltatls=0, scaledtlr=None, scaledtls=None, **kwargs)[source]¶
Make IPv6-Opts PDM option.
- Parameters:
code (
Option) – option type valuepsntp (
int) – packet sequence number (PSN) this packetpsnlr (
int) – packet sequence number (PSN) last receiveddeltatlr (
int) – delta time last received (in attoseconds)deltatls (
int) – delta time last sent (in attoseconds)scaledtlr (
int|None) – scale of delta time last received; derived fromdeltatlrif not givenscaledtls (
int|None) – scale of delta time last sent; derived fromdeltatlsif not given**kwargs (
Any) – arbitrary keyword arguments
- Return type:
- Returns:
Constructed option schema.
- _make_opt_qs(code, opt=None, *, func=<QSFunction.Quick_Start_Request: 0>, func_default=None, func_namespace=None, func_reversed=False, rate=0, ttl=0, nonce=0, reserved=0, unused=b'\\x00', **kwargs)[source]¶
Make IPv6-Opts QS option.
- Parameters:
code (
Option) – option type valueopt (
QuickStartOption|UnassignedOption|None) – option datafunc (
QSFunction|IntEnum|IntEnum|str|int) – QS function typefunc_default (
int|None) – default value for QS function typefunc_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – namespace for QS function typefunc_reversed (
bool) – reversed flag for QS function typerate (
int) – rate (in kbps)nonce (
int) – nonce valuereserved (
int) – reserved bits (R) after the nonceunused (
bytes) – the “Not Used” octet of a report of approved rate**kwargs (
Any) – arbitrary keyword arguments
- Return type:
- Returns:
Constructed option schema; an unassigned option schema if
optis a Quick-Start option parsed as unassigned, c.f._read_opt_qs().
- _make_opt_rpl(code, opt=None, *, down=False, rank_err=False, fwd_err=False, id=0, rank=0, reserved=0, sub_tlvs=b'', **kwargs)[source]¶
Make IPv6-Opts RPL option.
- Parameters:
code (
Option) – option type valuedown (
bool) – down flagrank_err (
bool) – rank error flagfwd_err (
bool) – forwarding error flagid (
int) – RPL instance IDrank (
int) – sender rankreserved (
int) – reserved flag bits, i.e. the low five bits of the flags octetsub_tlvs (
bytes) – sub-TLVs, as raw octets**kwargs (
Any) – arbitrary keyword arguments
- Return type:
- Returns:
Constructed option schema.
- Raises:
ProtocolError – If
reserveddoes not fit in five bits, orsub_tlvsdoes not fit in the option.
- _make_opt_mpl(code, opt=None, *, seed_type=None, seed_type_default=None, seed_type_namespace=None, seed_type_reversed=False, max=False, drop=False, reserved=0, seq=0, seed=None, **kwargs)[source]¶
Make IPv6-Opts MPL option.
- Parameters:
code (
Option) – option type valueseed_type (
SeedID|IntEnum|IntEnum|str|int|None) – seed-id type (Sfield); inferred fromseedif not givenseed_type_default (
int|None) – default value of seed-id typeseed_type_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – namespace of seed-id typeseed_type_reversed (
bool) – reversed flag of seed-id typemax (
bool) – maximum sequence number flagdrop (
bool) – drop packet flagreserved (
int) – reserved bits (rsv), i.e. the low four bits of the flags octetseq (
int) – MPL sequence numberseed (
int|IPv6Address|None) – MPL seed ID, ignored when the seed-id type isIPV6_SOURCE_ADDRESS, as the seed is then the IPv6 source address**kwargs (
Any) – arbitrary keyword arguments
- Return type:
- Returns:
Constructed option schema.
- Raises:
ProtocolError – If the seed ID is missing or does not fit the seed-id type.
- _make_opt_ilnp(code, opt=None, *, nonce=0, **kwargs)[source]¶
Make IPv6-Opts ILNP option.
- Parameters:
code (
Option) – option type valueopt (
ILNPOption|None) – option datanonce (
int) – ILNP nonce value**kwargs (
Any) – arbitrary keyword arguments
- Return type:
- Returns:
Constructed option schema.
- _make_opt_lio(code, opt=None, *, id=b'', **kwargs)[source]¶
Make IPv6-Opts LIO option.
- Parameters:
code (
Option) – option type valueopt (
LineIdentificationOption|None) – option dataid (
bytes) – line ID value**kwargs (
Any) – arbitrary keyword arguments
- Return type:
- Returns:
Constructed option schema.
- _make_opt_jumbo(code, opt=None, *, len=0, **kwargs)[source]¶
Make IPv6-Opts Jumbo Payload option.
- Parameters:
code (
Option) – option type valueopt (
JumboPayloadOption|None) – option datalen (
int) – jumbo payload length**kwargs (
Any) – arbitrary keyword arguments
- Return type:
- Returns:
Constructed option schema.
- _make_opt_home(code, opt=None, *, addr='::', **kwargs)[source]¶
Make IPv6-Opts Home Address option.
- Parameters:
code (
Option) – option type valueopt (
HomeAddressOption|None) – option dataaddr (
IPv6Address|str|bytes|int) – home address value**kwargs (
Any) – arbitrary keyword arguments
- Return type:
- Returns:
Constructed option schema.
- _make_opt_ip_dff(code, opt=None, *, version=0, dup=False, ret=False, reserved=0, seq=0, **kwargs)[source]¶
Make IPv6-Opts IP DFF option.
- Parameters:
code (
Option) – option type valueopt (
IPDFFOption|None) – option dataversion (
int) – DFF versiondup (
bool) – duplicate packet flagret (
bool) – return packet flagreserved (
int) – reserved bits, i.e. the low four bits of the flags octetseq (
int) – DFF sequence number**kwargs (
Any) – arbitrary keyword arguments
- Return type:
- Returns:
Constructed option schema.
- __option__: DefaultDict[Option | int, str | tuple[Callable[[Option, OrderedMultiDict[Option, Option]], Option], Callable[[Option, Option | None, Any], Option]]]¶
Option code to method mapping, c.f.
_read_ipv6_opts()and/or_make_ipv6_opts(). Astrvalue names the methods_read_opt_${name}and_make_opt_${name}, falling back to_read_opt_none/_make_opt_nonewhen they do not exist; any other value is a(parser, constructor)pair of callables.
- __post_init__(file=None, length=None, *, extension=False, **kwargs)[source]¶
Post initialisation hook.
- Overloads:
self, file (IO[bytes] | bytes), length (Optional[int]), extension (bool), kwargs (Any) → None
self, kwargs (Any) → None
- Parameters:
See also
For construction argument, please refer to
self.make.
Header Schemas¶
- class pcapkit.protocols.schema.internet.ipv6_opts.IPv6_Opts(*args: _VT, **kwargs: _VT)[source]¶
Bases:
SchemaHeader schema for IPv6-Opts packet.
- class pcapkit.protocols.schema.internet.ipv6_opts.Option(dict_=None, **kwargs)[source]¶
Bases:
EnumSchema[Option]Header schema for IPv6-Opts options.
- class pcapkit.protocols.schema.internet.ipv6_opts.UnassignedOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for IPv6-Opts unassigned options.
- class pcapkit.protocols.schema.internet.ipv6_opts.PadOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for IPv6-Opts padding options.
The two padding options do not share a wire shape: a
Pad1option is a lone type octet, whereas aPadNoption is a type octet, anOpt Data Lenoctet, and that many padding octets [RFC 8200 Section 4.2]. Both theOpt Data Lenoctet (Option.len) and the padding data (self.pad) are therefore sized from the option type, so that aPad1option consumes exactly one octet.
- class pcapkit.protocols.schema.internet.ipv6_opts.TunnelEncapsulationLimitOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for IPv6-Opts tunnel encapsulation limit options.
- class pcapkit.protocols.schema.internet.ipv6_opts.RouterAlertOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for IPv6-Opts router alert options.
- alert: RouterAlert = <EnumField alert>¶
Router alert.
- class pcapkit.protocols.schema.internet.ipv6_opts.CALIPSOOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for IPv6-Opts common architecture label IPv6 security options.
- class pcapkit.protocols.schema.internet.ipv6_opts._SMFDPDOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
SchemaHeader schema for IPv6-Opts SMF DPD options with generic representation.
The
testfield forward-matches the first three octets of the option –Option Type,Opt Data Lenand the octet carrying the DPD mode bit – without consuming them, so thatsmf_dpd_data_selector()can size and choose the schema which then reads the option properly. Itsnamespaceoffsets are therefore bit offsets into the option, not into any one field of it:Opt Data Lenis octet 1, i.e. bits 8 to 15, and the mode bit is the first bit of octet 2 [RFC 6621 Section 8.1].- test: SMFDPDTestFlag = <ForwardMatchField test>¶
SMF DPD mode.
- data: SMFIdentificationBasedDPDOption | SMFHashBasedDPDOption = <SwitchField data>¶
SMF DPD data.
- class pcapkit.protocols.schema.internet.ipv6_opts.SMFDPDOption(dict_=None, **kwargs)[source]¶
Bases:
Option,EnumSchema[SMFDPDMode]Header schema for IPv6-Opts simplified multicast forwarding duplicate packet detection (
SMF_DPD) options.
- class pcapkit.protocols.schema.internet.ipv6_opts.SMFIdentificationBasedDPDOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
SMFDPDOptionHeader schema for IPv6-Opts SMF identification-based DPD options.
Removed in version 1.5.0:
test, a field the HOPOPT schema lacks, so that the same octets parse alike under both headers (#441).- info: TaggerIDInfo = <BitField info>¶
TaggerID information.
- tid: bytes | IPv4Address | IPv6Address = <ConditionalField tid>¶
TaggerID.
- class pcapkit.protocols.schema.internet.ipv6_opts.SMFHashBasedDPDOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
SMFDPDOptionHeader schema for IPv6-Opts SMF hash-based DPD options.
- class pcapkit.protocols.schema.internet.ipv6_opts.PDMOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for IPv6-Opts performance and diagnostic metrics (PDM) options.
- class pcapkit.protocols.schema.internet.ipv6_opts._QuickStartOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
SchemaHeader schema for IPv6-Opts quick start options in generic representation.
- flags: QSTestFlags = <ForwardMatchField flags>¶
Flags.
- data: QuickStartRequestOption | QuickStartReportOption = <SwitchField data>¶
QS data.
- class pcapkit.protocols.schema.internet.ipv6_opts.QuickStartOption(dict_=None, **kwargs)[source]¶
Bases:
Option,EnumSchema[QSFunction]Header schema for IPv6-Opts quick start options.
- flags: QuickStartFlags = <BitField flags>¶
Flags.
- class pcapkit.protocols.schema.internet.ipv6_opts.QuickStartRequestOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
QuickStartOptionHeader schema for IPv6-Opts quick start request options.
- class pcapkit.protocols.schema.internet.ipv6_opts.QuickStartReportOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
QuickStartOptionHeader schema for IPv6-Opts quick start report of approved rate options.
- class pcapkit.protocols.schema.internet.ipv6_opts.RPLOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for IPv6-Opts routing protocol for low-power and lossy networks (RPL) options.
- class pcapkit.protocols.schema.internet.ipv6_opts.MPLOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for IPv6-Opts multicast protocol for low-power and lossy networks (MPL) options.
- class pcapkit.protocols.schema.internet.ipv6_opts.MPLFlags[source]¶
Bases:
TypedDictMPL flags.
- class pcapkit.protocols.schema.internet.ipv6_opts.ILNPOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for IPv6-Opts identifier-locator network protocol (ILNP) options.
- class pcapkit.protocols.schema.internet.ipv6_opts.LineIdentificationOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for IPv6-Opts line-identification options.
- class pcapkit.protocols.schema.internet.ipv6_opts.JumboPayloadOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for IPv6-Opts jumbo payload options.
- class pcapkit.protocols.schema.internet.ipv6_opts.HomeAddressOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for IPv6-Opts home address options.
- addr: IPv6Address = <IPv6AddressField addr>¶
Home address.
- class pcapkit.protocols.schema.internet.ipv6_opts.IPDFFOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for IPv6-Opts depth-first forwarding (
IP_DFF) options.
Type Stubs¶
- class pcapkit.protocols.schema.internet.ipv6_opts.TaggerIDInfo[source]¶
Bases:
TypedDictTaggerID information.
- class pcapkit.protocols.schema.internet.ipv6_opts.QuickStartFlags[source]¶
Bases:
TypedDictQuick-Start flags.
- class pcapkit.protocols.schema.internet.ipv6_opts.RPLFlags[source]
Bases:
TypedDictRPL flags.
- down: int
Down flag.
- rank_err: int
Rank error flag.
- fwd_err: int
Forwarding error flag.
- reserved: int
Reserved flag bits.
- class pcapkit.protocols.schema.internet.ipv6_opts.MPLFlags[source]
Bases:
TypedDictMPL flags.
- type: int
Seed-ID type. Identifies the length of the Seed-ID.
- max: int
Max flag.
1indicates that the value in the sequence field is known to be the largest sequence number that was received from the MPL Seed.
- drop: int
Verification flag.
0indicates that the MPL Option conforms to this specification.
- reserved: int
Reserved bits (
rsv).
- class pcapkit.protocols.schema.internet.ipv6_opts.DFFFlags[source]
Bases:
TypedDictIP_DFFflags.- ver: int
Version.
- dup: int
Duplicate flag.
- ret: int
Return flag.
- reserved: int
Reserved bits.
- class pcapkit.protocols.schema.internet.ipv6_opts.SMFDPDTestFlag[source]¶
Bases:
TypedDictSMF_DPDtest flag.
Auxiliary Functions¶
The option helpers are shared with
hopopt and documented in
pcapkit.protocols.schema.internet.ipv6_option. The functions below bind
them to this module’s error prefix and option schemas;
rpl_opt_sub_tlv_len() and
pad_opt_data_len() are
used unchanged.
- pcapkit.protocols.schema.internet.ipv6_opts.mpl_opt_seed_id_len(pkt)[source]¶
Return MPL Seed-ID length.
See
pcapkit.protocols.schema.internet.ipv6_option.mpl_opt_seed_id_len(); errors are reported asIPv6-Opts.- Return type:
- pcapkit.protocols.schema.internet.ipv6_opts.calipso_pad_len(pkt)[source]¶
Return CALIPSO option padding length.
See
pcapkit.protocols.schema.internet.ipv6_option.calipso_pad_len(); errors are reported asIPv6-Opts.- Return type:
- pcapkit.protocols.schema.internet.ipv6_opts.mpl_opt_pad_len(pkt)[source]¶
Return MPL option padding length.
See
pcapkit.protocols.schema.internet.ipv6_option.mpl_opt_pad_len(); errors are reported asIPv6-Opts.- Return type:
- pcapkit.protocols.schema.internet.ipv6_opts.smf_dpd_data_selector(pkt)[source]¶
Selector function for
_SMFDPDOption.datafield.See
pcapkit.protocols.schema.internet.ipv6_option.smf_dpd_data_selector(), choosing among the schemas registered withSMFDPDOption; errors are reported asIPv6-Opts.- Return type:
- pcapkit.protocols.schema.internet.ipv6_opts.smf_i_dpd_tid_selector(pkt)[source]¶
Selector function for
SMFIdentificationBasedDPDOption.tidfield.See
pcapkit.protocols.schema.internet.ipv6_option.smf_i_dpd_tid_selector(); errors are reported asIPv6-Opts.- Return type:
- pcapkit.protocols.schema.internet.ipv6_opts.smf_i_dpd_id_len(pkt)[source]¶
Return SMF I-DPD identifier length.
See
pcapkit.protocols.schema.internet.ipv6_option.smf_i_dpd_id_len(); errors are reported asIPv6-Opts.- Return type:
- pcapkit.protocols.schema.internet.ipv6_opts.quick_start_data_selector(pkt)[source]¶
Selector function for
_QuickStartOption.datafield.See
pcapkit.protocols.schema.internet.ipv6_option.quick_start_data_selector(), choosing among the schemas registered withQuickStartOption, andUnassignedOptionfor an unassigned QS function.- Return type:
Data Models¶
- class pcapkit.protocols.data.internet.ipv6_opts.IPv6_Opts(*args: VT, **kwargs: VT)[source]¶
Bases:
ProtocolData model for IPv6-Opts protocol.
- options: OrderedMultiInfo[Option, Option]¶
IPv6-Opts options.
- class pcapkit.protocols.data.internet.ipv6_opts.Option(dict_=None, **kwargs)[source]¶
Bases:
DataData model for IPv6-Opts option data.
- action: OptionAction¶
Unknown option action.
- class pcapkit.protocols.data.internet.ipv6_opts.UnassignedOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for IPv6-Opts unassigned option.
- class pcapkit.protocols.data.internet.ipv6_opts.PadOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for IPv6-Opts padding options.
Changed in version 1.5.0: New required field
pad(#1223).
- class pcapkit.protocols.data.internet.ipv6_opts.TunnelEncapsulationLimitOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for IPv6-Opts tunnel encapsulation limit option.
- class pcapkit.protocols.data.internet.ipv6_opts.RouterAlertOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for IPv6-Opts router alert option.
- value: RouterAlert¶
Router alert value.
- class pcapkit.protocols.data.internet.ipv6_opts.CALIPSOOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for IPv6-Opts Common Architecture Label IPv6 Security Option (CALIPSO) option.
Changed in version 1.5.0: New required field
pad(#1403).
- class pcapkit.protocols.data.internet.ipv6_opts.SMFDPDOption(dict_=None, **kwargs)[source]¶
Bases:
OptionData model for IPv6-Opts Simplified Multicast Forwarding Duplicate Packet Detection (
SMF_DPD) option.- dpd_type: SMFDPDMode¶
DPD type.
- class pcapkit.protocols.data.internet.ipv6_opts.SMFIdentificationBasedDPDOption(*args: VT, **kwargs: VT)[source]¶
Bases:
SMFDPDOptionData model for IPv6-Opts I-DPD (Identification-Based DPD) option.
- tid: bytes | IPv4Address | IPv6Address | None¶
TaggerID.
- class pcapkit.protocols.data.internet.ipv6_opts.SMFHashBasedDPDOption(*args: VT, **kwargs: VT)[source]¶
Bases:
SMFDPDOptionData model for IPv6-Opts H-DPD (Hash-Based DPD) option.
- class pcapkit.protocols.data.internet.ipv6_opts.PDMOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for IPv6-Opts Performance Diagnostic Metrics (PDM) option.
- class pcapkit.protocols.data.internet.ipv6_opts.QuickStartOption(dict_=None, **kwargs)[source]¶
Bases:
OptionData model for IPv6-Opts Quick Start option.
- func: QSFunction¶
QS function.
- class pcapkit.protocols.data.internet.ipv6_opts.QuickStartRequestOption(*args: VT, **kwargs: VT)[source]¶
Bases:
QuickStartOptionData model for IPv6-Opts Quick Start request option.
Changed in version 1.5.0: New required field
reserved(#1235).
- class pcapkit.protocols.data.internet.ipv6_opts.QuickStartReportOption(*args: VT, **kwargs: VT)[source]¶
Bases:
QuickStartOptionData model for IPv6-Opts Quick Start report of approved rate option.
- class pcapkit.protocols.data.internet.ipv6_opts.RPLOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for IPv6-Opts Routing Protocol for Low-Power and Lossy Networks (RPL) option.
Changed in version 1.5.0: New required field
sub_tlvs(#1199).- sub_tlvs: bytes¶
Sub-TLVs [RFC 6553 Section 3], kept as raw octets.
- class pcapkit.protocols.data.internet.ipv6_opts.RPLFlags(*args: VT, **kwargs: VT)[source]¶
Bases:
DataData model for IPv6-Opts RPL option flags fields.
Changed in version 1.5.0: New required field
reserved(#1199).
- class pcapkit.protocols.data.internet.ipv6_opts.MPLOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for IPv6-Opts Multicast Protocol for Low-Power and Lossy Networks (MPL) option.
- seed_id: int | IPv6Address | None¶
Seed ID.
- class pcapkit.protocols.data.internet.ipv6_opts.MPLFlags(*args: VT, **kwargs: VT)[source]¶
Bases:
DataData model for IPv6-Opts MPL option flags fields.
Changed in version 1.5.0: New required field
reserved(#1235).
- class pcapkit.protocols.data.internet.ipv6_opts.ILNPOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for IPv6-Opts Identifier-Locator Network Protocol (ILNP) Nonce option.
- class pcapkit.protocols.data.internet.ipv6_opts.LineIdentificationOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for IPv6-Opts Line-Identification option.
- class pcapkit.protocols.data.internet.ipv6_opts.JumboPayloadOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for Jumbo Payload option.
- class pcapkit.protocols.data.internet.ipv6_opts.HomeAddressOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for IPv6-Opts Home Address option.
- address: IPv6Address¶
Home address.
- class pcapkit.protocols.data.internet.ipv6_opts.IPDFFOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for IPv6-Opts Depth-First Forwarding (
IP_DFF) option.
- class pcapkit.protocols.data.internet.ipv6_opts.DFFFlags(*args: VT, **kwargs: VT)[source]¶
Bases:
DataData model for IPv6-Opts
IP_DFFoption flags.Changed in version 1.5.0: New required field
reserved(#1235).
Footnotes