IPv6-Frag - Fragment Header for IPv6¶
pcapkit.protocols.internet.ipv6_frag contains
IPv6_Frag
only, which implements extractor for Fragment Header for
IPv6 (IPv6-Frag) [*], whose structure is described as
below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Next Header |
1 |
8 |
Reserved |
|
2 |
16 |
|
Fragment Offset |
3 |
29 |
Reserved |
|
3 |
31 |
|
More Flag |
4 |
32 |
|
Identification |
- class pcapkit.protocols.internet.ipv6_frag.IPv6_Frag(file=None, length=None, **kwargs)[source]¶
Bases:
Internet[IPv6_Frag,IPv6_Frag]This class implements Fragment Header for IPv6.
- property name: Literal['Fragment Header for IPv6']¶
Name of current protocol.
- property payload: ProtocolBase | NoReturn¶
Payload of current instance.
- Raises:
UnsupportedCall – if the protocol is used as an IPv6 extension header
- 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
- read(length=None, *, extension=False, **kwargs)[source]¶
Read Fragment Header for IPv6.
Structure of IPv6-Frag header [RFC 8200]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Reserved | Fragment Offset |Res|M| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identification | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- make(next=<TransType.UDP: 17>, next_default=None, next_namespace=None, next_reversed=False, offset=0, mf=False, id=0, payload=b'', **kwargs)[source]¶
Make (construct) packet data.
- Parameters:
next (
TransType|IntEnum|IntEnum|str|int) – Next header.next_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Namespace of next header.next_reversed (
bool) – If the namespace of next header is reversed.offset (
int) – Fragment offset.mf (
bool) – More fragments flag.id (
int) – Identification.payload (
bytes|ProtocolBase|Schema) – Payload of current instance.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed packet data.
- __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¶
Data Models¶
- class pcapkit.protocols.data.internet.ipv6_frag.IPv6_Frag(*args: VT, **kwargs: VT)[source]¶
Bases:
ProtocolData model for IPv6 fragment header.
Footnotes