MH - Mobility Header¶
pcapkit.protocols.internet.mh
contains
MH
only,
which implements extractor for Mobility Header
(MH) *, whose structure is described as below:
Octets |
Bits |
Name |
Description |
---|---|---|---|
0 |
0 |
|
Next Header |
1 |
8 |
|
Header Length |
2 |
16 |
|
Mobility Header Type |
3 |
24 |
Reserved |
|
4 |
32 |
|
Checksum |
6 |
48 |
|
Message Data |
Todo
Implements extractor for message data of all MH types.
- class pcapkit.protocols.internet.mh.MH(file=None, length=None, **kwargs)[source]¶
-
This class implements Mobility Header.
- Parameters
*args (Any) – Arbitrary positional arguments.
**kwargs (Any) – Arbitrary keyword arguments.
- Return type
Protocol[PT]
- __post_init__(file: BinaryIO, length: Optional[int] = None, *, version: Literal[4, 6] = 4, extension: bool = False, **kwargs: Any) None [source]¶
- __post_init__(**kwargs: Any) None
Post initialisation hook.
- Parameters
See also
For construction argument, please refer to
make()
.- Return type
- property name: Literal['Mobility Header']¶
Name of current protocol.
- Return type
Literal
[‘Mobility Header’]
- property payload: Protocol | NoReturn¶
Payload of current instance.
- Raises
UnsupportedCall – if the protocol is used as an IPv6 extension header
- property protocol: Optional[str] | 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, *, version=4, extension=False, **kwargs)[source]¶
Read Mobility Header.
Structure of MH header [RFC 6275]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Payload Proto | Header Len | MH Type | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | . . . Message Data . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Data Structures¶
- class pcapkit.protocols.data.internet.mh.MH(next, length, type, chksum, data)[source]¶
Bases:
Info
Data model for MH protocol.
- Parameters
*args (VT) – Arbitrary positional arguments.
**kwargs (VT) – Arbitrary keyword arguments.
- Return type