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_default (
Optional
[int
]) – Default value of next header.next_namespace (
Union
[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.
Header Schemas¶
- class pcapkit.protocols.schema.internet.ipv6_frag.IPv6_Frag(dict_=None, **kwargs)[source]¶
Bases:
Schema
Header schema for IPv6-Frag packet.
- next: Enum_TransType = <EnumField next>¶
Next header.
- reserved: bytes = <PaddingField reserved>¶
Reserved.
- flags: Flags = <BitField flags>¶
Fragment offset and flags.
- id: int = <UInt32Field id>¶
Identification.
- payload: bytes = <PayloadField payload>¶
Payload.
Data Models¶
- class pcapkit.protocols.data.internet.ipv6_frag.IPv6_Frag(*args: VT, **kwargs: VT)[source]¶
Bases:
Protocol
Data model for IPv6 fragment header.
- next: TransType¶
Next header.
- offset: int¶
Fragment offset.
- mf: bool¶
More flag.
- id: int¶
Identification.
Footnotes