IPv6 - Internet Protocol version 6¶
pcapkit.protocols.internet.ipv6
contains
IPv6
only,
which implements extractor for Internet Protocol
version 6 (IPv6) *, whose structure is described
as below:
Octets |
Bits |
Name |
Description |
---|---|---|---|
0 |
0 |
|
Version ( |
0 |
4 |
|
Traffic Class |
1 |
12 |
|
Flow Label |
4 |
32 |
|
Payload Length (header excludes) |
6 |
48 |
|
Next Header |
7 |
56 |
|
Hop Limit |
8 |
64 |
|
Source Address |
24 |
192 |
|
Destination Address |
- class pcapkit.protocols.internet.ipv6.IPv6(file=None, length=None, **kwargs)[source]¶
-
This class implements Internet Protocol version 6.
- Parameters
*args (Any) – Arbitrary positional arguments.
**kwargs (Any) – Arbitrary keyword arguments.
- Return type
Protocol[PT]
- property name: Literal['Internet Protocol version 6']¶
Name of corresponding protocol.
- Return type
Literal
[‘Internet Protocol version 6’]
- property src: IPv6Address¶
Source IP address.
- Return type
- property dst: IPv6Address¶
Destination IP address.
- Return type
- property extension_headers: OrderedMultiDict[ExtensionHeader, Protocol]¶
IPv6 extension header records.
- Return type
- read(length=None, **kwargs)[source]¶
Read Internet Protocol version 6 (IPv6).
Structure of IPv6 header [RFC 2460]:
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| Traffic Class | Flow Label | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Payload Length | Next Header | Hop Limit | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Source Address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Destination Address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- classmethod id()[source]¶
Index ID of the protocol.
- Returns
Index ID of the protocol.
- Return type
tuple[Literal[“IPv6”]]
Data Structures¶
- class pcapkit.protocols.data.internet.ipv6.IPv6(version, class, label, payload, next, limit, src, dst)[source]¶
Bases:
Info
Data model for Internet Protocol version 6.
Important
Due to the preserved keyword conflict, please use
from_dict()
to create an instance of this data model.- Parameters
*args (Any) – Arbitrary positional arguments.
**kwargs (Any) – Arbitrary keyword arguments.
- Return type
- version: Literal[6]¶
Version.
- src: IPv6Address¶
Source address.
- dst: IPv6Address¶
Destination address.