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.
This class currently supports parsing og the following MH message types, which are resgitered in the
self.__message__attribute:Message Type
Message Parser
Message Constructor
This class currently supports parsing the following MH options, which are registered in the
self.__option__attribute:Option Code
Option Parser
Option Constructor
This class currently supports parsing of the following MH CGA extensions, which are registered in the
self.__extension__attribute:CGA Extension Code
CGA Extension Parser
CGA Extension Constructor
Multi_Prefix- 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
- classmethod register_extension(code, meth)[source]¶
Register a CGA extension parser.
- Parameters:
code (
CGAExtension) – CGA extension code.meth (
str|tuple[Callable[[CGAExtension,OrderedMultiDict[CGAExtension,CGAExtension]],CGAExtension],Callable[[CGAExtension,CGAExtension|None,Any],CGAExtension]]) – Method name or callable to parse and/or construct the extension.
- Return type:
- 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 . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- make(next=<TransType.UDP: 17>, next_default=None, next_namespace=None, next_reversed=False, type=<Packet.Binding_Refresh_Request: 0>, type_default=None, type_namespace=None, type_reversed=False, chksum=b'', data=b'\\x00\\x00', payload=b'', **kwargs)[source]¶
Make (construct) packet data.
- Parameters:
next (
TransType|IntEnum|IntEnum|str|int) – Next header type.next_default (
int|None) – Default value for next header type field.next_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Namespace of next header type field.next_reversed (
bool) – Whether the bits of next header type field is reversed.type (
Packet|IntEnum|IntEnum|str|int) – Mobility Header type.type_default (
int|None) – Default value for Mobility Header type field.type_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Namespace of Mobility Header type field.type_reversed (
bool) – Whether the bits of Mobility Header type field is reversed.chksum (
bytes) – Checksum.payload (
ProtocolBase|Schema|bytes) – Payload of next layer protocol.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed packet data.
- _read_msg_unknown(schema, *, header)[source]¶
Read unknown MH message type.
- Parameters:
schema (
UnknownMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_brr(schema, *, header)[source]¶
Read MH binding refresh request (BRR) message type.
Structure of MH Binding Refresh Request Message [RFC 6275]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
BindingRefreshRequestMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_hoti(schema, *, header)[source]¶
Read MH home test initiation (HoTI) message type.
Structure of MH Home Test Initiation Message [RFC 6275]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Home Init Cookie + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
HomeTestInitMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_coti(schema, *, header)[source]¶
Read MH care-of test initiation (CoTI) message type.
Structure of MH Care-of Test Initiation Message [RFC 6275]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Care-of Init Cookie + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
CareofTestInitMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_hot(schema, *, header)[source]¶
Read MH home test (HoT) message type.
Structure of MH Home Test Message [RFC 6275]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Home Nonce Index | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Home Init Cookie + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Home Keygen Token + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
HomeTestMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_cot(schema, *, header)[source]¶
Read MH care-of test (CoT) message type.
Structure of MH Care-of Test Message [RFC 6275]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Care-of Nonce Index | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Care-of Init Cookie + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Care-of Keygen Token + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
CareofTestMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_bu(schema, *, header)[source]¶
Read MH binding update (BU) message type.
Structure of MH Binding Update Message [RFC 6275]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence # | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |A|H|L|K| Reserved | Lifetime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
BindingUpdateMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_ba(schema, *, header)[source]¶
Read MH binding acknowledgement (BA) message type.
Structure of MH Binding Acknowledgement Message [RFC 6275]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Status |K| Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence # | Lifetime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
BindingAcknowledgementMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_be(schema, *, header)[source]¶
Read MH binding error (BE) message type.
Structure of MH Binding Error Message [RFC 6275]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Status | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Home Address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . . . Mobility Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
BindingErrorMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _make_msg_unknown(message, *, data=b'', **kwargs)[source]¶
Make MH unknown message type.
- Parameters:
message (
UnknownMessage|None) – Message data model.data (
bytes) – Raw message data.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed message type.
- _make_msg_brr(message, *, options=None, **kwargs)[source]¶
Make MH binding refresh request (BRR) message type.
- Parameters:
- Return type:
- Returns:
Constructed message type.
- _make_msg_hoti(message, *, cookie=b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00', options=None, **kwargs)[source]¶
Make MH home test init (HoTI) message type.
- Parameters:
- Return type:
- Returns:
Constructed message type.
- _make_msg_coti(message, *, cookie=b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00', options=None, **kwargs)[source]¶
Make MH care-of test init (CoTI) message type.
- Parameters:
- Return type:
- Returns:
Constructed message type.
- _make_msg_hot(message, *, nonce_index=0, cookie=b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00', token=b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00', options=None, **kwargs)[source]¶
Make MH home test (HoT) message type.
- Parameters:
message (
HomeTestMessage|None) – Message data model.nonce_index (
int) – Home nonce index.cookie (
bytes) – Home test cookie.token (
bytes) – Home test token.options (
OrderedMultiDict[Option,Option] |list[Option|tuple[Option,dict[str,Any]] |bytes] |None) – Mobility options.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed message type.
- _make_msg_cot(message, *, nonce_index=0, cookie=b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00', token=b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00', options=None, **kwargs)[source]¶
Make MH care-of test (CoT) message type.
- Parameters:
message (
CareofTestMessage|None) – Message data model.nonce_index (
int) – Care-of nonce index.cookie (
bytes) – Care-of test cookie.token (
bytes) – Care-of test token.options (
OrderedMultiDict[Option,Option] |list[Option|tuple[Option,dict[str,Any]] |bytes] |None) – Mobility options.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed message type.
- _make_msg_bu(message, *, seq=0, ack=False, home=False, lla_compat=False, key_mngt=False, lifetime=4, options=None, **kwargs)[source]¶
Make MH binding update (BU) message type.
- Parameters:
message (
BindingUpdateMessage|None) – Message data model.seq (
int) – Sequence number.ack (
bool) – Acknowledgement flag.home (
bool) – Home registration flag.lla_compat (
bool) – LLA compatibility flag.key_mngt (
bool) – Key management mobility option flag.lifetime (
int|timedelta) – Lifetime in seconds or timedelta.options (
OrderedMultiDict[Option,Option] |list[Option|tuple[Option,dict[str,Any]] |bytes] |None) – Mobility options.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed message type.
- _make_msg_ba(message, *, status=<StatusCode.Binding_Update_accepted_Proxy_Binding_Update_accepted: 0>, status_default=None, status_namespace=None, status_reversed=False, key_mngt=False, seq=0, lifetime=4, options=None, **kwargs)[source]¶
Make MH binding acknowledge (BA) message type.
- Parameters:
message (
BindingAcknowledgementMessage|None) – Message data model.status (
StatusCode|IntEnum|IntEnum|str|int) – Status code.status_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Status code namespace.status_reversed (
bool) – Reverse status code namespace.key_mngt (
bool) – Key management mobility option flag.seq (
int) – Sequence number.lifetime (
int|timedelta) – Lifetime in seconds or timedelta.options (
OrderedMultiDict[Option,Option] |list[Option|tuple[Option,dict[str,Any]] |bytes] |None) – Mobility options.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed message type.
- _make_msg_be(message, *, status=<StatusCode.Binding_Update_accepted_Proxy_Binding_Update_accepted: 0>, status_default=None, status_namespace=None, status_reversed=False, home='::', options=None, **kwargs)[source]¶
Make MH binding error (BE) message type.
- Parameters:
message (
BindingErrorMessage|None) – Message data model.status (
StatusCode|IntEnum|IntEnum|str|int) – Status code.status_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Status code namespace.status_reversed (
bool) – Reverse status code namespace.home (
IPv6Address|int|str|bytes) – Home address.options (
OrderedMultiDict[Option,Option] |list[Option|tuple[Option,dict[str,Any]] |bytes] |None) – Mobility options.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed message type.
- _read_mh_options(options_schema)[source]¶
Read MH options.
Structure of MH 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 | Option Data... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters:
- Return type:
- Returns:
Parsed MH options data.
- _read_opt_none(schema, *options)[source]¶
Read MH unassigned option.
- Parameters:
schema (
UnassignedOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_pad(schema, *, options)[source]¶
Read MH padding option.
Structure of MH padding option [RFC 6275]:
Pad1option:0 0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+ | Type = 0 | +-+-+-+-+-+-+-+-+
PadNoption:0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - - | Type = 1 | Option Length | Option Data +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
- Parameters:
schema (
PadOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_pad(schema, *, options)[source]¶
Read MH padding option.
Structure of MH padding option [RFC 6275]:
Pad1option:0 0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+ | Type = 0 | +-+-+-+-+-+-+-+-+
PadNoption:0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - - | Type = 1 | Option Length | Option Data +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
- Parameters:
schema (
PadOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_bra(schema, *, options)[source]¶
Read MH binding refresh advice option.
Structure of MH Binding Refresh Advice 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type = 2 | Length = 2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Refresh Interval | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
BindingRefreshAdviceOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_aca(schema, *, options)[source]¶
Read MH alternate care-of address option.
Structure of MH Alternate Care-of 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type = 3 | Length = 16 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Alternate Care-of Address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
AlternateCareofAddressOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_ni(schema, *, options)[source]¶
Read MH nonce indices option.
Structure of MH Nonce Indices 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type = 4 | Length = 4 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Home Nonce Index | Care-of Nonce Index | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
NonceIndicesOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_bad(schema, *, options)[source]¶
Read MH binding authorization data option.
Structure of MH Binding Authorization Data 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type = 5 | Option Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | Authenticator | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
AuthorizationDataOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_mnp(schema, *, options)[source]¶
Read MH mobile network prefix option.
Structure of MH Mobile Network Prefix option [RFC 3963]:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | Reserved | Prefix Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Mobile Network Prefix + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters:
schema (
MobileNetworkPrefixOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_lla(schema, *, options)[source]¶
Read MH link-layer address (MH-LLA) option.
Structure of MH Link-Layer Address option [RFC 5568]:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option-Code | LLA .... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
LinkLayerAddressOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_mn_id(schema, *, options)[source]¶
Read MH mobile node identifier option.
Structure of MH Mobile Node Identifier option [RFC 4283]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Subtype | Identifier ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
MNIDOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_auth(schema, *, options)[source]¶
Read MH mobility message authentication option.
Structure of MH Mobility Message Authentication option [RFC 4285]:
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 | Subtype | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Mobility SPI | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Authentication Data .... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
AuthOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_mesg_id(schema, *, options)[source]¶
Read MH mobility message replay protection option.
Structure of MH Mobility Message Replay Protection option [RFC 4285]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Timestamp ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Timestamp | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
MesgIDOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_cga_pr(schema, *, options)[source]¶
Read MH CGA parameters request option.
Structure of MH CGA Parameters Request option [RFC 4866]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
CGAParametersRequestOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_cga_param(schema, *, options)[source]¶
Read MH CGA parameters option.
Structure of MH CGA Parameters option [RFC 4866]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | : : : CGA Parameters : : : | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
CGAParametersOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_signature(schema, *, options)[source]¶
Read MH signature option.
Structure of MH Signature option [RFC 4866]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | : : : Signature : : : | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
SignatureOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_phkt(schema, *, options)[source]¶
Read MH permanent home keygen token option.
Structure of MH Permanent Home Keygen Token option [RFC 4866]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | : : : Permanent Home Keygen Token : : : | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
PermanentHomeKeygenTokenOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_ct_init(schema, *, options)[source]¶
Read MH Care-of Test Init option.
Structure of MH Care-of Test Init option [RFC 4866]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
CareofTestInitOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_ct(schema, *, options)[source]¶
Read MH Care-of Test option.
Structure of MH Care-of Test option [RFC 4866]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Care-of Keygen Token + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
CareofTestOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _make_opt_none(type, option=None, *, data=b'', **kwargs)[source]¶
Make MH unassigned option.
- Parameters:
type (
Option) – Option type.option (
UnassignedOption|None) – Option data model.data (
bytes) – Option data.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_bra(type, option=None, *, interval=0, **kwargs)[source]¶
Make MH binding refresh advice option.
- Parameters:
type (
Option) – Option type.option (
BindingRefreshAdviceOption|None) – Option data model.interval (
int) – Refresh interval.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_aca(type, option=None, *, address='::', **kwargs)[source]¶
Make MH alternate care-of address option.
- Parameters:
type (
Option) – Option type.option (
AlternateCareofAddressOption|None) – Option data model.address (
bytes|str|int|IPv6Address) – Alternate care-of address.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_ni(type, option=None, *, home=0, careof=0, **kwargs)[source]¶
Make MH nonce indices option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
- _make_opt_bad(type, option=None, *, data=b'', **kwargs)[source]¶
Make MH binding authorization data option.
- Parameters:
type (
Option) – Option type.option (
AuthorizationDataOption|None) – Option data model.data (
bytes) – Authenticator.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_mnp(type, option=None, *, prefix='::/0', **kwargs)[source]¶
Make MH mobile network prefix option.
- Parameters:
type (
Option) – Option type.option (
MobileNetworkPrefixOption|None) – Option data model.prefix (
bytes|str|IPv6Network) – Mobile network prefix.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_lla(type, option=None, *, address=b'', **kwargs)[source]¶
Make MH link-layer address option.
- Parameters:
type (
Option) – Option type.option (
LinkLayerAddressOption|None) – Option data model.address (
bytes) – Link-layer address.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_mn_id(type, option=None, *, subtype=<MNIDSubtype.IPv6_Address: 2>, subtype_default=None, subtype_namespace=None, subtype_reversed=False, identifier='::', **kwargs)[source]¶
Make MH mobile node identifier option.
- Parameters:
type (
Option) – Option type.option (
MNIDOption|None) – Option data model.subtype (
MNIDSubtype|IntEnum|IntEnum|str|int) – MN-ID subtype.subtype_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – MN-ID subtype namespace.subtype_reversed (
bool) – MN-ID subtype reversed flag.identifier (
bytes|str|IPv6Address|int) – Identifier.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_auth(type, option=None, *, subtype=<AuthSubtype.MN_HA: 1>, subtype_default=None, subtype_namespace=None, subtype_reversed=False, spi=0, data=b'', **kwargs)[source]¶
Make MH authentication option.
- Parameters:
type (
Option) – Option type.option (
AuthOption|None) – Option data model.subtype (
AuthSubtype|IntEnum|IntEnum|str|int) – Authentication subtype.subtype_default (
int|None) – Authentication subtype default value.subtype_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Authentication subtype namespace.subtype_reversed (
bool) – Authentication subtype reversed flag.spi (
int) – Security parameter index.data (
bytes) – Authentication data.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_mesg_id(type, option=None, *, timestamp=None, interval=None, **kwargs)[source]¶
Make MH mobility message replay protection option.
- Parameters:
type (
Option) – Option type.option (
MesgIDOption|None) – Option data model.timestamp (
NTPTimestamp|None) – NTP timestamp, c.f., RFC 1305.interval (
datetime|None) – Timestamp interval (since UNIX-epoch).**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_cga_pr(type, option=None, **kwargs)[source]¶
Make MH CGA parameters request option.
- Parameters:
type (
Option) – Option type.option (
CGAParametersRequestOption|None) – Option data model.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_cga_param(type, option=None, *, parameters=None, **kwargs)[source]¶
Make MH CGA paramters option.
- Parameters:
type (
Option) – Option type.option (
CGAParametersOption|None) – Option data model.parameters (
list[CGAParameter|CGAParameter|dict[str,Any] |bytes] |None) – CGA parameters.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_signature(type, option=None, *, signature=b'', **kwargs)[source]¶
Make MH signature option.
- Parameters:
type (
Option) – Option type.option (
SignatureOption|None) – Option data model.signature (
bytes) – Signature data.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_phkt(type, option=None, *, token=b'', **kwargs)[source]¶
Make MH permanent home keygen token option.
- Parameters:
type (
Option) – Option type.option (
PermanentHomeKeygenTokenOption|None) – Option data model.token (
bytes) – Token data.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_ct_init(type, option=None, **kwargs)[source]¶
Make MH Care-of Test Init option.
- Parameters:
type (
Option) – Option type.option (
CareofTestInitOption|None) – Option data model.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_ct(type, option=None, token=b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00', **kwargs)[source]¶
Make MH Care-of Test option.
- Parameters:
type (
Option) – Option type.option (
CareofTestOption|None) – Option data model.token (
bytes) – Care-of keygen token.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _read_cga_extensions(extensions_schema)[source]¶
Read CGA extensions.
Structure of CGA extensions [RFC 4581]:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Extension Type | Extension Data Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Extension Data ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters:
extensions_schema (
list[CGAExtension]) – Parsed CGA extensions.- Return type:
- Returns:
Parsed CGA extensions data.
- _read_ext_none(schema, *, extensions)[source]¶
Read unknown CGA extension.
- Parameters:
schema (
UnknownExtension) – Parsed extension schema.extensions (
OrderedMultiDict[CGAExtension,CGAExtension]) – Parsed MH CGA extensions.
- Return type:
- Returns:
Constructed extension data.
- _read_ext_multiprefix(schema, *, extensions)[source]¶
Read multi-prefix CGA extension.
Structure of Multi-Prefix CGA extension [RFC 5535]:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Extension Type | Extension Data Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |P| Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Prefix[1] + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Prefix[2] + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . . . . . . . . . +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Prefix[n] + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters:
schema (
MultiPrefixExtension) – Parsed extension schema.extensions (
OrderedMultiDict[CGAExtension,CGAExtension]) – Parsed MH CGA extensions.
- Return type:
- Returns:
Constructed extension data.
- _make_cga_extensions(extensions)[source]¶
Make CGA extensions for MH.
- Parameters:
extensions (
OrderedMultiDict[CGAExtension,CGAExtension] |list[CGAExtension|tuple[CGAExtension,dict[str,Any]] |bytes]) – CGA extensions.- Return type:
tuple[list[CGAExtension|bytes],int]- Returns:
Tuple of extensions and total length of extensions.
- _make_ext_none(type, option=None, *, data=b'', **kwargs)[source]¶
Make CGA extension.
- Parameters:
type (
CGAExtension) – Extension type.option (
UnknownExtension|None) – Extension data model.data (
bytes) – Extension data.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed extension schema.
- _make_ext_multiprefix(type, option=None, *, flag=False, prefixes=None, **kwargs)[source]¶
Make CGA multi-prefix extension.
- Parameters:
type (
CGAExtension) – Extension type.option (
MultiPrefixExtension|None) – Extension data model.flag (
bool) – Public key flag.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed extension schema.
- __message__: DefaultDict[Packet | int, str | tuple[Callable[[Packet, MH], MH], Callable[[MH | None, Any], Packet]]]¶
DefaultDict[Enum_Packet, str | tuple[PacketParser, PacketConstructor]]: Message type to method mapping. Method names are expected to be referred to the class by
_read_msg_${name}and/or_make_msg_${name}, and if such name not found, the value should then be a method that can parse the message type by itself.
- __option__: DefaultDict[Option | int, str | tuple[Callable[[Option, OrderedMultiDict[Option, Option]], Option], Callable[[Option, Option | None, Any], Option]]]¶
DefaultDict[Enum_Option, str | tuple[OptionParser, OptionConstructor]]: Option type to method mapping. Method names are expected to be referred to the class by
_read_option_${name}and/or_make_opt_${name}, and if such name not found, the value should then be a method that can parse the option by itself.
- __extension__: DefaultDict[CGAExtension | int, str | tuple[Callable[[CGAExtension, OrderedMultiDict[CGAExtension, CGAExtension]], CGAExtension], Callable[[CGAExtension, CGAExtension | None, Any], CGAExtension]]]¶
DefaultDict[Enum_CGAExtension, str | tuple[ExtensionParser, ExtensionConstructor]]: CGA extension type to method mapping. Method names are expected to be referred to the class by
_read_extension_${name}and/or_make_ext_${name}, and if such name not found, the value should then be a method that can parse the CGA extension by itself.
- __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.
Auxiliary Data¶
Header Schemas¶
- class pcapkit.protocols.schema.internet.mh.MH(dict_=None, **kwargs)[source]¶
Bases:
SchemaHeader schema for MH packets.
- class pcapkit.protocols.schema.internet.mh.Option(dict_=None, **kwargs)[source]¶
Bases:
EnumSchema[Option]Header schema for MH options.
- class pcapkit.protocols.schema.internet.mh.UnassignedOption(dict_=None, **kwargs)[source]¶
Bases:
OptionHeader schema for unassigned MH options.
- class pcapkit.protocols.schema.internet.mh.PadOption(dict_=None, **kwargs)[source]¶
Bases:
OptionHeader schema for MH padding options.
- class pcapkit.protocols.schema.internet.mh.BindingRefreshAdviceOption(dict_=None, **kwargs)[source]¶
Bases:
OptionHeader schema for MH binding refresh advice options.
- class pcapkit.protocols.schema.internet.mh.AlternateCareofAddressOption(dict_=None, **kwargs)[source]¶
Bases:
OptionHeader schema for MH alternate care-of address options.
- address: IPv6Address = <IPv6AddressField address>¶
Alternate care-of address.
- class pcapkit.protocols.schema.internet.mh.NonceIndicesOption(dict_=None, **kwargs)[source]¶
Bases:
OptionHeader schema for MH nonce indices options.
- class pcapkit.protocols.schema.internet.mh.AuthorizationDataOption(dict_=None, **kwargs)[source]¶
Bases:
OptionHeader schema for MH binding authorization data options.
- class pcapkit.protocols.schema.internet.mh.MobileNetworkPrefixOption(dict_=None, **kwargs)[source]¶
Bases:
OptionHeader schema for MH mobile network prefix options.
- prefix: IPv6Address = <IPv6AddressField prefix>¶
Mobile network prefix.
- class pcapkit.protocols.schema.internet.mh.LinkLayerAddressOption(dict_=None, **kwargs)[source]¶
Bases:
OptionHeader schema for MH link-layer address (MH-LLA) options.
- class pcapkit.protocols.schema.internet.mh.MNIDOption(dict_=None, **kwargs)[source]¶
Bases:
OptionHeader schema for MH mobile node identifier (MNID) options.
- subtype: MNIDSubtype = <EnumField subtype>¶
Subtype.
- identifier: bytes | str | IPv6Address = <SwitchField identifier>¶
Identifier.
- class pcapkit.protocols.schema.internet.mh.AuthOption(dict_=None, **kwargs)[source]¶
Bases:
OptionHeader schema for Mobility Message Authentication options.
- subtype: AuthSubtype = <EnumField subtype>¶
Subtype.
- class pcapkit.protocols.schema.internet.mh.MesgIDOption(dict_=None, **kwargs)[source]¶
Bases:
OptionHeader schema for Mobility Message Replay Protection options.
- fraction: int = <UInt32Field fraction>¶
Timestamp fractions (1/2**32 seconds per unit, c.f., RFC 1305).
- class pcapkit.protocols.schema.internet.mh.CGAParametersRequestOption(dict_=None, **kwargs)[source]¶
Bases:
OptionHeader schema for CGA Parameters Request options.
- class pcapkit.protocols.schema.internet.mh.CGAExtension(dict_=None, **kwargs)[source]¶
Bases:
EnumSchema[CGAExtension]Header schema for CGA extensions.
- type: CGAExtension = <EnumField type>¶
Extension type.
- class pcapkit.protocols.schema.internet.mh.CGAParameter(dict_=None, **kwargs)[source]¶
Bases:
SchemaHeader schema for CGA Parameters.
- public_key_test: ANSIKeyLengthTest = <ForwardMatchField public_key_test>¶
Public key length test.
- extensions: list[CGAExtension] = <OptionField extensions>¶
Extension fields.
- class pcapkit.protocols.schema.internet.mh.CGAParametersOption(dict_=None, **kwargs)[source]¶
Bases:
OptionHeader schema for CGA Parameters options.
- parameters: list[CGAParameter] = <ListField parameters>¶
CGA parameters, c.f., RFC 3972.
- class pcapkit.protocols.schema.internet.mh.UnknownExtension(dict_=None, **kwargs)[source]¶
Bases:
CGAExtensionHeader schema for unknown CGA extensions.
- class pcapkit.protocols.schema.internet.mh.MultiPrefixExtension(dict_=None, **kwargs)[source]¶
Bases:
CGAExtensionHeader schema for Multi-Prefix CGA extensions.
- flags: MultiPrefixExtensionFlags = <BitField flags>¶
Flags.
- class pcapkit.protocols.schema.internet.mh.Packet(dict_=None, **kwargs)[source]¶
Bases:
EnumSchema[Packet]Header schema for MH packet data.
- class pcapkit.protocols.schema.internet.mh.SignatureOption(dict_=None, **kwargs)[source]¶
Bases:
OptionHeader schema for MH Signature options.
- class pcapkit.protocols.schema.internet.mh.PermanentHomeKeygenTokenOption(dict_=None, **kwargs)[source]¶
Bases:
OptionHeader schema for Permanent Home Keygen Token options.
- class pcapkit.protocols.schema.internet.mh.CareofTestInitOption(dict_=None, **kwargs)[source]¶
Bases:
OptionHeader schema for MH Care-of Test Init options.
- class pcapkit.protocols.schema.internet.mh.CareofTestOption(dict_=None, **kwargs)[source]¶
Bases:
OptionHeader schema for MH Care-of Test options.
- class pcapkit.protocols.schema.internet.mh.UnknownMessage(dict_=None, **kwargs)[source]¶
Bases:
PacketHeader schema for MH unknown message type.
- class pcapkit.protocols.schema.internet.mh.BindingRefreshRequestMessage(dict_=None, **kwargs)[source]¶
Bases:
PacketHeader schema for MH Binding Refresh Request (BRR) message.
- class pcapkit.protocols.schema.internet.mh.HomeTestInitMessage(dict_=None, **kwargs)[source]¶
Bases:
PacketHeader schema for MH Home Test Init (HoTI) message.
- class pcapkit.protocols.schema.internet.mh.CareofTestInitMessage(dict_=None, **kwargs)[source]¶
Bases:
PacketHeader schema for MH Care-of Test Init (CoTI) messages.
- class pcapkit.protocols.schema.internet.mh.HomeTestMessage(dict_=None, **kwargs)[source]¶
Bases:
PacketHeader schema for MH Home Test (HoT) message.
- class pcapkit.protocols.schema.internet.mh.CareofTestMessage(dict_=None, **kwargs)[source]¶
Bases:
PacketHeader schema for MH Care-of Test (CoT) message.
- class pcapkit.protocols.schema.internet.mh.BindingUpdateMessage(dict_=None, **kwargs)[source]¶
Bases:
PacketHeader schema for MH Binding Update (BU) messages.
- flags: BindingUpdateMessageFlags = <BitField flags>¶
Flags.
- class pcapkit.protocols.schema.internet.mh.BindingAcknowledgementMessage(dict_=None, **kwargs)[source]¶
Bases:
PacketHeader schema for MH Binding Acknowledgement (BA) messages.
- status: StatusCode = <EnumField status>¶
Status.
- flags: BindingAcknowledgementMessageFlags = <BitField flags>¶
Flags.
- class pcapkit.protocols.schema.internet.mh.BindingErrorMessage(dict_=None, **kwargs)[source]¶
Bases:
PacketHeader schema for MH Binding Error (BE) messages.
- status: BindingError = <EnumField status>¶
Status.
- home: IPv6Address = <IPv6AddressField home>¶
Home address.
Type Stubs¶
- class pcapkit.protocols.schema.internet.mh.ANSIKeyLengthTest[source]¶
Bases:
TypedDictLength test for ANSI.1 encoded data, c.f.,
CGAParameter.public_key_test.
- class pcapkit.protocols.schema.internet.mh.MultiPrefixExtensionFlags[source]¶
Bases:
TypedDictFlags for
MultiPrefixExtension.flags.
- class pcapkit.protocols.schema.internet.mh.BindingUpdateMessageFlags[source]¶
Bases:
TypedDictFlags for
BindingUpdateMessage.flags.
- class pcapkit.protocols.schema.internet.mh.BindingAcknowledgementMessageFlags[source]¶
Bases:
TypedDictFlags for
BindingAcknowledgementMessage.flags.
Auxiliary Functions¶
Data Models¶
- class pcapkit.protocols.data.internet.mh.MH(dict_=None, **kwargs)[source]¶
Bases:
ProtocolData model for MH protocol.
- class pcapkit.protocols.data.internet.mh.Option(dict_=None, **kwargs)[source]¶
Bases:
DataData model for MH options.
- type: Enum_Option¶
Option type.
- class pcapkit.protocols.data.internet.mh.UnassignedOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for unassigned MH options.
- class pcapkit.protocols.data.internet.mh.PadOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for Pad option.
- class pcapkit.protocols.data.internet.mh.BindingRefreshAdviceOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for Binding Refresh Advice option.
- class pcapkit.protocols.data.internet.mh.AlternateCareofAddressOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for Alternate Care-of Address option.
- address: IPv6Address¶
Alternate care-of address.
- class pcapkit.protocols.data.internet.mh.NonceIndicesOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for Nonce Indices option.
- class pcapkit.protocols.data.internet.mh.AuthorizationDataOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for Binding Authorization Data option.
- class pcapkit.protocols.data.internet.mh.MobileNetworkPrefixOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for Mobile Network Prefix option.
- prefix: IPv6Network¶
Mobile Network Prefix.
- class pcapkit.protocols.data.internet.mh.LinkLayerAddressOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Link-Layer Address (MH-LLA) option.
- code: Enum_LLACode¶
Option code.
- class pcapkit.protocols.data.internet.mh.MNIDOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MN-ID option.
- subtype: Enum_MNIDSubtype¶
Subtype.
- class pcapkit.protocols.data.internet.mh.AuthOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for Mobility Message Authentication option.
- subtype: Enum_AuthSubtype¶
Subtype.
- class pcapkit.protocols.data.internet.mh.MesgIDOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for Mobility Message Replay Protection option.
- timestamp: dt_type¶
Timestamp.
- ntp_timestamp: NTPTimestamp¶
NTP timestamp, c.f., RFC 1305.
- class pcapkit.protocols.data.internet.mh.CGAParametersRequestOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for CGA Parameters Request option.
- class pcapkit.protocols.data.internet.mh.CGAExtension(dict_=None, **kwargs)[source]¶
Bases:
DataData model for CGA extension.
- type: Enum_CGAExtension¶
Extension type.
- class pcapkit.protocols.data.internet.mh.CGAParameter(*args: VT, **kwargs: VT)[source]¶
Bases:
DataData model for CGA parameter.
- modifier: Enum_CGAType¶
Modifier.
- extensions: OrderedMultiDict[Enum_CGAExtension, CGAExtension]¶
Extension fields.
- class pcapkit.protocols.data.internet.mh.CGAParametersOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for CGA Parameters option.
- parameters: tuple[CGAParameter, ...]¶
CGA parameters, c.f., RFC 3972.
- class pcapkit.protocols.data.internet.mh.UnknownExtension(*args: VT, **kwargs: VT)[source]¶
Bases:
CGAExtensionData model for unknown CGA extensions.
- class pcapkit.protocols.data.internet.mh.MultiPrefixExtension(*args: VT, **kwargs: VT)[source]¶
Bases:
CGAExtensionData model for Multi-Prefix CGA extension.
- class pcapkit.protocols.data.internet.mh.SignatureOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Signature option.
- class pcapkit.protocols.data.internet.mh.PermanentHomeKeygenTokenOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for Permanent Home Keygen Token option.
- class pcapkit.protocols.data.internet.mh.CareofTestInitOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionHeader schema for MH Care-of Test Init options.
- class pcapkit.protocols.data.internet.mh.CareofTestOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionHeader schema for MH Care-of Test options.
- class pcapkit.protocols.data.internet.mh.UnknownMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH unknown message type.
- class pcapkit.protocols.data.internet.mh.BindingRefreshRequestMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Binding Refresh Request (BRR) message type.
- options: OrderedMultiDict[Enum_Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.HomeTestInitMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData modelf for MH Home Test Init (HoTI) message type.
- options: OrderedMultiDict[Enum_Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.CareofTestInitMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Care-of Test Init (CoTI) message type.
- options: OrderedMultiDict[Enum_Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.HomeTestMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Home Test (HoT) message type.
- options: OrderedMultiDict[Enum_Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.CareofTestMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Care-of Test (CoT) message type.
- options: OrderedMultiDict[Enum_Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.BindingUpdateMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Binding Update message type.
- lifetime: timedelta¶
Lifetime.
- options: OrderedMultiDict[Enum_Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.BindingAcknowledgementMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Binding Acknowledge (BA) message type.
- status: Enum_StatusCode¶
Status.
- lifetime: timedelta¶
Lifetime.
- options: OrderedMultiDict[Enum_Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.BindingErrorMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Binding Error (BE) message type.
- status: Enum_BindingError¶
Status.
- home: IPv6Address¶
Home address.
- options: OrderedMultiDict[Enum_Option, Option]¶
Mobility options.
Footnotes