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
The CGA Parameters option (type 12) is the one registered mobility option still on the generic handler. It is unreachable rather than unimplemented – see the Mobility Header section of Help Wanted for the two faults involved, both of which are in shared field machinery rather than here.
- class pcapkit.protocols.internet.mh.MH(file=None, length=None, **kwargs)[source]¶
-
This class implements Mobility Header.
This class currently supports parsing of the following MH message types, which are registered 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
- 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.
- 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.
- _read_msg_fbu(schema, *, header)[source]¶
Read MH fast binding update (FBU) message type.
Structure of MH Fast Binding Update Message [RFC 5568 Section 6.2.2]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence # | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |A|H|L|K| Reserved | Lifetime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
RFC 5568 Section 6.2.2 states that the FBU is identical to the Mobile IPv6 binding update (BU) message – but that statement is about message layout, not field units. The same section defines the Lifetime as “the requested time in seconds”, unlike the BU lifetime’s units of 4 seconds [RFC 6275 Section 6.1.7], so it is not scaled on the way in.
- Parameters:
schema (
FastBindingUpdateMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_fback(schema, *, header)[source]¶
Read MH fast binding acknowledgment (FBack) message type.
Structure of MH Fast Binding Acknowledgment Message [RFC 5568 Section 6.2.3]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Status |K| Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence # | Lifetime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
RFC 5568 Section 6.2.3 defines the FBack status values inline instead of drawing them from the IANA Status Codes registry, whose values
1and131mean something else entirely. The status is therefore reported as aFastBindingAcknowledgmentStatus, which is local to this module, rather than being mislabelled as aStatusCode.The Lifetime is likewise defined by RFC 5568 Section 6.2.3 as “the granted lifetime … in seconds”, unlike the BA lifetime’s units of 4 seconds [RFC 6275 Section 6.1.7], so it is not scaled on the way in.
- Parameters:
schema (
FastBindingAcknowledgmentMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_fna(schema, *, header)[source]¶
Read MH fast neighbor advertisement (FNA) message type.
Structure of MH Fast Neighbor Advertisement Message [RFC 4068 Section 6.3.3]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . . . Mobility Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
The FNA message is deprecated by RFC 5568 Section 8, which replaces it with the unsolicited neighbor advertisement (UNA) of RFC 4861. Its wire format is therefore taken from RFC 4068, the specification RFC 5568 obsoletes, since a NAR is still permitted to process the message as specified there.
- Parameters:
schema (
FastNeighborAdvertisementMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_emh(schema, *, header)[source]¶
Read MH experimental mobility header message type.
Structure of MH Experimental Mobility Header Message [RFC 5096 Section 3]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Payload Proto | Header Len | MH Type | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | . . . Message Data . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
RFC 5096 Section 3 defines no fields beyond those of the mobility header itself, so the message data is carried opaquely – its layout is whatever the experiment in question defines. Two bytes of padding are required when no data is present.
- Parameters:
schema (
ExperimentalMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_hi(schema, *, header)[source]¶
Read MH handover initiate (HI) message type.
Structure of MH Handover Initiate Message [RFC 5568 Section 6.2.1.1, RFC 5949 Section 6.1.1]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence # | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |S|U|P|F| Resv | Code | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . | | . Mobility Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
RFC 5568 defines only the
SandUflags; thePandFflags, and code values2and3, are added by RFC 5949 Section 6.1.1. All four flags are registered in the IANA Handover Initiate Flags registry, hence all four are parsed here.- Parameters:
schema (
HandoverInitiateMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_hack(schema, *, header)[source]¶
Read MH handover acknowledge (HAck) message type.
Structure of MH Handover Acknowledge Message [RFC 5568 Section 6.2.1.2, RFC 5949 Section 6.1.2]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence # | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |U|P|F| Reserved| Code | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . | | . Mobility Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
RFC 5568 reserves the whole first octet of the message data; the
U,PandFflags carved out of it, and code values5and6, are added by RFC 5949 Section 6.1.2. All three flags are registered in the IANA Handover Acknowledge Flags registry, hence all three are parsed here.- Parameters:
schema (
HandoverAcknowledgeMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_brm(schema, *, header)[source]¶
Read MH binding revocation (BRM) message type.
Structure of MH Binding Revocation Indication Message [RFC 5846 Section 5.1]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | B.R. Type = 1 | R. Trigger | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence # |P|V|G| Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility options . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Structure of MH Binding Revocation Acknowledgement Message [RFC 5846 Section 5.2]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | B.R. Type = 2 | Status | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence # |P|V|G| Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
One Mobility Header type carries both forms, told apart by the
B.R. Typeoctet inside the message rather than by the header type. The two have identical geometry, and the only field whose meaning differs is the octet after it – a revocation trigger in an indication and a status code in an acknowledgement, drawn from two different registries – so a single data model carries both, withbr_typesaying which it is.- Parameters:
schema (
BindingRevocationMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_fbm(schema, *, header)[source]¶
Read MH flow binding (FB) message type.
Structure of MH Flow Binding Indication Message [RFC 7109 Section 6.1.1]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Flow Binding Type = 1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence # | Trigger |A| Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility options . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Structure of MH Flow Binding Acknowledgement Message [RFC 7109 Section 6.1.2]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Flow Binding Type = 2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence # | Status | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility options . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
As with the binding revocation message, one Mobility Header type carries both forms and the
Flow Binding Typefield inside the message says which. TheAflag exists only in the indication; the acknowledgement reserves the whole octet it is taken from, so a well-formed acknowledgement reads back asack=False.- Parameters:
schema (
FlowBindingMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_has(schema, *, header)[source]¶
Read MH home agent switch (HAS) message type.
Structure of MH Home Agent Switch Message [RFC 5142 Section 4]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |# of Addresses | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + . . . Home Agent Addresses . . . + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + . . . Mobility Options . . . + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
The
# of Addressesfield is not carried into the data model, since it is exactlylen(addresses)and a second copy of a length is a second thing to keep in step. An empty list is meaningful rather than degenerate: RFC 5142 Section 4 uses a count of zero to tell the mobile node to run home agent discovery instead.- Parameters:
schema (
HomeAgentSwitchMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_hb(schema, *, header)[source]¶
Read MH heartbeat message type.
Structure of MH Heartbeat Message [RFC 5847 Section 3.3]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved |U|R| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
The
UandRflags are the two least significant bits of the first half-word, not the most significant ones the other mobility messages put their flags in [RFC 5847 Section 3.3]. The sequence number is 32 bits wide, also unlike the 16-bit ones elsewhere.- Parameters:
schema (
HeartbeatMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_lra(schema, *, header)[source]¶
Read MH localized routing acknowledgment (LRA) message type.
Structure of MH Localized Routing Acknowledgment Message [RFC 6705 Section 10.2]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence # | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |U| Reserved | Status | Lifetime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+The status codes are enumerated in
LocalizedRoutingStatus, which is local to this module because RFC 6705 defines them inline and IANA registers them nowhere – not even in the general Status Codes registry.- Parameters:
schema (
LocalizedRoutingAcknowledgmentMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_lri(schema, *, header)[source]¶
Read MH localized routing initiation (LRI) message type.
Structure of MH Localized Routing Initiation Message [RFC 6705 Section 10.1]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence # | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved | Lifetime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
The lifetime is in seconds here, not in the units of 4 seconds that RFC 6275 uses for the binding messages [RFC 6705 Section 10.1], so it is not scaled on the way in.
- Parameters:
schema (
LocalizedRoutingInitiationMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_sq(schema, *, header)[source]¶
Read MH subscription query (SQ) message type.
Structure of MH Subscription Query Message [RFC 7161 Section 4.3.1.2]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence # | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
The sequence number is a single octet, counted modulo 256, unlike the 16-bit ones of most other mobility messages [RFC 7161 Section 4.3.1.2].
- Parameters:
schema (
SubscriptionQueryMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_sr(schema, *, header)[source]¶
Read MH subscription response (SR) message type.
Structure of MH Subscription Response Message [RFC 7161 Section 4.3.2.2]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence # |I| Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility Options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
SubscriptionResponseMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_upa(schema, *, header)[source]¶
Read MH update notification acknowledgement (UPA) message type.
Structure of MH Update Notification Acknowledgement Message [RFC 7077 Section 4.2]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence # | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Status Code | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
UpdateNotificationAcknowledgementMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _read_msg_upn(schema, *, header)[source]¶
Read MH update notification (UPN) message type.
Structure of MH Update Notification Message [RFC 7077 Section 4.1]:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence # | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Notification Reason |A|D| Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Mobility options . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
The notification reason is 16 bits wide, not the 8 that a status octet elsewhere in the Mobility Header would be.
- Parameters:
schema (
UpdateNotificationMessage) – Parsed message type schema.header (
MH) – Parsed MH header schema.
- Return type:
- Returns:
Parsed message type data.
- _make_msg_unknown(message=None, *, 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=None, *, options=None, **kwargs)[source]¶
Make MH binding refresh request (BRR) message type.
- Parameters:
- Return type:
- Returns:
Constructed message type.
- _make_msg_hoti(message=None, *, 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=None, *, 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=None, *, 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=None, *, 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=None, *, 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=None, *, 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=None, *, 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.
- _make_msg_fbu(message=None, *, seq=0, ack=True, home=True, lla_compat=False, key_mngt=False, lifetime=4, options=None, **kwargs)[source]¶
Make MH fast binding update (FBU) message type.
- Parameters:
message (
FastBindingUpdateMessage|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 as atimedelta. Unlike the BU/BA lifetime, this one counts seconds rather than units of 4 seconds [RFC 5568 Section 6.2.2], so the value is not scaled.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_fback(message=None, *, status=<FastBindingAcknowledgmentStatus.Fast_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 fast binding acknowledgment (FBack) message type.
- Parameters:
message (
FastBindingAcknowledgmentMessage|None) – Message data model.status (
FastBindingAcknowledgmentStatus|IntEnum|IntEnum|str|int) – Status code, c.f.,FastBindingAcknowledgmentStatus.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 as atimedelta. Unlike the BU/BA lifetime, this one counts seconds rather than units of 4 seconds [RFC 5568 Section 6.2.3], so the value is not scaled.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_fna(message=None, *, options=None, **kwargs)[source]¶
Make MH fast neighbor advertisement (FNA) message type.
- Parameters:
- Return type:
- Returns:
Constructed message type.
- _make_msg_emh(message=None, *, data=b'\\x00\\x00', **kwargs)[source]¶
Make MH experimental mobility header message type.
- Parameters:
message (
ExperimentalMessage|None) – Message data model.data (
bytes) – Experimental message data.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed message type.
- _make_msg_hi(message=None, *, seq=0, assign=False, buffer=False, proxy=False, forward=False, code=<HandoverInitiateStatus.FBU_with_the_PCoA_as_source_IP_address: 0>, code_default=None, code_namespace=None, code_reversed=False, options=None, **kwargs)[source]¶
Make MH handover initiate (HI) message type.
- Parameters:
message (
HandoverInitiateMessage|None) – Message data model.seq (
int) – Sequence number.assign (
bool) – Assigned address configuration flag.buffer (
bool) – Buffer flag.proxy (
bool) – Proxy flag.forward (
bool) – Forwarding flag.code (
HandoverInitiateStatus|IntEnum|IntEnum|str|int) – Code.code_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Code namespace.code_reversed (
bool) – Reverse code namespace.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_hack(message=None, *, seq=0, buffer=False, proxy=False, forward=False, code=<HandoverACKStatus.Handover_Accepted_or_Successful: 0>, code_default=None, code_namespace=None, code_reversed=False, options=None, **kwargs)[source]¶
Make MH handover acknowledge (HAck) message type.
- Parameters:
message (
HandoverAcknowledgeMessage|None) – Message data model.seq (
int) – Sequence number.buffer (
bool) – Buffer flag.proxy (
bool) – Proxy flag.forward (
bool) – Forwarding flag.code (
HandoverACKStatus|IntEnum|IntEnum|str|int) – Code.code_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Code namespace.code_reversed (
bool) – Reverse code namespace.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_brm(message=None, *, br_type=<BindingRevocation.Binding_Revocation_Indication: 1>, br_type_default=None, br_type_namespace=None, br_type_reversed=False, code=<RevocationTrigger.Unspecified: 0>, code_default=None, code_namespace=None, code_reversed=False, seq=0, proxy=False, ipv4_hoa=False, global_revocation=False, options=None, **kwargs)[source]¶
Make MH binding revocation (BRM) message type.
- Parameters:
message (
BindingRevocationMessage|None) – Message data model.br_type (
BindingRevocation|IntEnum|IntEnum|str|int) – Binding revocation type, saying which form of the message this is.br_type_default (
int|None) – Default binding revocation type.br_type_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Binding revocation type namespace.br_type_reversed (
bool) – Reverse binding revocation type namespace.code (
RevocationTrigger|RevocationStatusCode|IntEnum|IntEnum|str|int) – Revocation trigger, for an indication, or acknowledgement status, for an acknowledgement.code_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Code namespace.code_reversed (
bool) – Reverse code namespace.seq (
int) – Sequence number.proxy (
bool) – Proxy binding flag.ipv4_hoa (
bool) – IPv4 home address binding only flag.global_revocation (
bool) – Global revocation flag.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_fbm(message=None, *, fb_type=<FlowBindingType.Indication: 1>, fb_type_default=None, fb_type_namespace=None, fb_type_reversed=False, seq=0, code=<FlowBindingIndicationTrigger.Unspecified: 1>, code_default=None, code_namespace=None, code_reversed=False, ack=False, options=None, **kwargs)[source]¶
Make MH flow binding (FB) message type.
- Parameters:
message (
FlowBindingMessage|None) – Message data model.fb_type (
FlowBindingType|IntEnum|IntEnum|str|int) – Flow binding type, saying which form of the message this is.fb_type_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Flow binding type namespace.fb_type_reversed (
bool) – Reverse flow binding type namespace.seq (
int) – Sequence number.code (
FlowBindingIndicationTrigger|FlowBindingACKStatus|IntEnum|IntEnum|str|int) – Indication trigger, for an indication, or acknowledgement status, for an acknowledgement.code_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Code namespace.code_reversed (
bool) – Reverse code namespace.ack (
bool) – Acknowledgement requested flag. Meaningful only in an indication.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_has(message=None, *, addresses=None, options=None, **kwargs)[source]¶
Make MH home agent switch (HAS) message type.
- Parameters:
message (
HomeAgentSwitchMessage|None) – Message data model.addresses (
list[bytes|str|int|IPv6Address] |None) – Alternate home agent addresses. An empty list is valid and asks the mobile node to run home agent discovery.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_hb(message=None, *, unsolicited=False, response=False, seq=0, options=None, **kwargs)[source]¶
Make MH heartbeat message type.
- Parameters:
message (
HeartbeatMessage|None) – Message data model.unsolicited (
bool) – Unsolicited flag.response (
bool) – Response flag; unset makes this a heartbeat request.seq (
int) – Sequence number.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_lra(message=None, *, seq=0, unsolicited=False, status=<LocalizedRoutingStatus.Success: 0>, status_default=None, status_namespace=None, status_reversed=False, lifetime=0, options=None, **kwargs)[source]¶
Make MH localized routing acknowledgment (LRA) message type.
- Parameters:
message (
LocalizedRoutingAcknowledgmentMessage|None) – Message data model.seq (
int) – Sequence number.unsolicited (
bool) – Unsolicited flag.status (
LocalizedRoutingStatus|IntEnum|IntEnum|str|int) – Status, c.f.,LocalizedRoutingStatus.status_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Status namespace.status_reversed (
bool) – Reverse status namespace.lifetime (
int|timedelta) – Lifetime, in seconds or as atimedelta.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_lri(message=None, *, seq=0, lifetime=0, options=None, **kwargs)[source]¶
Make MH localized routing initiation (LRI) message type.
- Parameters:
message (
LocalizedRoutingInitiationMessage|None) – Message data model.seq (
int) – Sequence number.lifetime (
int|timedelta) – Lifetime, in seconds or as atimedelta. Unlike the binding messages, this one counts seconds rather than units of 4 seconds, so the value is not scaled.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_sq(message=None, *, seq=0, options=None, **kwargs)[source]¶
Make MH subscription query (SQ) message type.
- Parameters:
- Return type:
- Returns:
Constructed message type.
- _make_msg_sr(message=None, *, seq=0, info=False, options=None, **kwargs)[source]¶
Make MH subscription response (SR) message type.
- Parameters:
message (
SubscriptionResponseMessage|None) – Message data model.seq (
int) – Sequence number, echoed from the query.info (
bool) – Multicast information flag.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_upa(message=None, *, seq=0, status=<UpdateNotificationACKStatus.SUCCESS: 0>, status_default=None, status_namespace=None, status_reversed=False, options=None, **kwargs)[source]¶
Make MH update notification acknowledgement (UPA) message type.
- Parameters:
message (
UpdateNotificationAcknowledgementMessage|None) – Message data model.seq (
int) – Sequence number.status (
UpdateNotificationACKStatus|IntEnum|IntEnum|str|int) – Status.status_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Status namespace.status_reversed (
bool) – Reverse status namespace.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_upn(message=None, *, seq=0, reason=<UpdateNotificationReason.FORCE_REREGISTRATION: 1>, reason_default=None, reason_namespace=None, reason_reversed=False, ack=False, retransmit=False, options=None, **kwargs)[source]¶
Make MH update notification (UPN) message type.
- Parameters:
message (
UpdateNotificationMessage|None) – Message data model.seq (
int) – Sequence number.reason (
UpdateNotificationReason|IntEnum|IntEnum|str|int) – Notification reason.reason_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Notification reason namespace.reason_reversed (
bool) – Reverse notification reason namespace.ack (
bool) – Acknowledgement requested flag.retransmit (
bool) – Retransmission flag.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_fid_suboptions(suboptions_schema)[source]¶
Read MH flow identification sub-options.
Structure of MH flow identification sub-option [RFC 6089 Section 4.2.1]:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sub-Opt Type |Sub-Opt Length | Sub-Option Data... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
These are sub-options of one mobility option rather than mobility options in their own right, so they are dispatched here rather than through
self.__option__.Note
Dispatch is on the sub-option type code, never on
isinstanceof the schema class, and that is load-bearing rather than a matter of taste. Every schema class descends fromcollections.abc.Mapping, and on Python 3.10 and older they do not each get their own_abc_impl– they shareSchema’s. Oneabc.ABCMetacache therefore serves the whole family, and it is keyed only on the class being tested, not on the class being tested against. So oneissubclassanswer poisons every later question about the same class:>>> issubclass(ANIGeoLocationSuboption, Schema) # True, cached True >>> issubclass(ANIGeoLocationSuboption, ANINetworkIdentifierSuboption) True # wrong -- the cached True for Schema is handed back
The wrong answer goes both ways: a correct
Falseagainst a sibling then makesisinstance(sub, Schema)False, which is whatListField.packconsults, so packing a perfectly good option fails withFieldValueError. Python 3.11 and newer give each class its own cache and the checks behave, which is why this was invisible on a modern interpreter.The code is on the wire and the registry keys on it, so it is both the cheaper discriminator and the only one that cannot be poisoned. The same reasoning applies to
_read_ani_suboptions(),_read_qos_attributes(),_read_lcmp_suboptions()and their four constructor counterparts.- Parameters:
suboptions_schema (
list[FlowIdentificationSuboption]) – Parsed sub-option schemas.- Return type:
OrderedMultiDict[FlowIDSuboption,FlowIdentificationSuboption]- Returns:
Parsed sub-option data.
- _read_ani_suboptions(suboptions_schema)[source]¶
Read MH access network identifier sub-options.
Structure of MH access network identifier sub-option [RFC 6757 Section 3.1]:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ANI Type | ANI Length | Option Data ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The geo-location degrees of RFC 6757 Section 3.1.2 are 24-bit two’s-complement fixed-point values with nine integer bits. A
BitFieldreads them unsigned, so the sign is applied here, and both the decoded degrees and the raw signed integers are recorded – the latter so that the exact wire value survives a round trip through the data model.Note
Dispatch is on the sub-option type code rather than on
isinstanceof the schema class, for the reason given in_read_fid_suboptions().- Parameters:
suboptions_schema (
list[ANISuboption]) – Parsed sub-option schemas.- Return type:
- Returns:
Parsed sub-option data.
- _read_qos_attributes(attributes_schema)[source]¶
Read MH quality-of-service attributes.
Structure of MH quality-of-service attribute [RFC 7222 Section 4.2]:
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 | Value ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
Every bit rate here is in bits per second [RFC 7222 Section 4.2.1], not the kilobytes per second of the load information option’s capacity fields.
Dispatch is on the attribute type code rather than on
isinstanceof the schema class, for the reason given in_read_fid_suboptions().- Parameters:
attributes_schema (
list[QoSAttribute]) – Parsed attribute schemas.- Return type:
- Returns:
Parsed attribute data.
- _read_lcmp_suboptions(suboptions_schema)[source]¶
Read MH LMA-controlled MAG parameters sub-options.
Structure of MH LMA-controlled MAG parameters sub-option [RFC 8127 Section 3.1]:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LCMP Type | LCMP Length | Sub-Option Data ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
Only the re-registration start time is in units of 4 seconds; every other interval in these two sub-options is in whole seconds [RFC 8127 Section 3.1.1, RFC 8127 Section 3.1.2].
Dispatch is on the sub-option type code rather than on
isinstanceof the schema class, for the reason given in_read_fid_suboptions().- Parameters:
suboptions_schema (
list[LMAControlledMAGSuboption]) – Parsed sub-option schemas.- Return type:
OrderedMultiDict[LMAControlledMAGSuboption,LMAControlledMAGSuboption]- Returns:
Parsed sub-option data.
- static _decode_signed(value, width)[source]¶
Reinterpret an unsigned integer as a two’s-complement signed one.
- Parameters:
- Return type:
- Returns:
The signed value the same bits denote.
Note
BitFieldreads a sub-field as an unsigned integer, since that is what almost every bit-packed field in the mobility header is. The geo-location degrees of RFC 6757 Section 3.1.2 are the exception, so they are converted here rather than by teaching the field about signedness – a change that would touch every other user of it.
- _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.
Note
A
Pad1option occupies a single octet and carries noOption Lengthfield, so itslengthis1rather thanlength + 2. That one-octet wire shape is enforced byPadOptionitself, which sizes both the length octet and the padding data from the option type [RFC 6275 Section 6.2.5];clenis therefore always0here for a parsedPad1, and the check below only guards a schema built by hand.
- _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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
The Refresh Interval is measured in units of four seconds [RFC 6275 Section 6.2.4], the same unit the BU/BA lifetime uses, so it is scaled here.
- 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.
- _read_opt_exp(schema, *, options)[source]¶
Read MH experimental mobility option.
Structure of MH Experimental Mobility option [RFC 5096 Section 4]:
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 | Data ..... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters:
schema (
ExperimentalMobilityOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_badf(schema, *, options)[source]¶
Read MH binding authorization data for FMIPv6 (BADF) option.
Structure of MH Binding Authorization Data for FMIPv6 option [RFC 5568 Section 6.4.5]:
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 = 21 | Option Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SPI | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | Authenticator | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
RFC 5568 Section 6.4.5 defines the option length as the length of the Authenticator in bytes, i.e. it does not cover the 4-byte SPI, unlike every other mobility option, whose length covers all of its option data. The wording is inherited from the RFC 6275 binding authorization data option (type
5), which carries no SPI and for which the two readings coincide. Because RFC 5568 also requires this option to be the last mobility option present, the discrepancy never has to be resolved in order to find the following option, so the literal reading is used here and the reportedlengthaccounts for the extra 4 bytes.- Parameters:
schema (
BADFOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_ipv6_ap(schema, *, options)[source]¶
Read MH mobility header IPv6 address/prefix option.
Structure of MH Mobility Header IPv6 Address/Prefix option [RFC 5568 Section 6.4.2]:
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 | Prefix Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + IPv6 Address/Prefix + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The option code identifies which address the option carries, c.f.,
IPv6AddressPrefixCode. It, too, is defined inline by RFC 5568 Section 6.4.2 with no IANA registry behind it, hence the enumeration is local to this module.Note
RFC 5568 prints the type as
17, which is the neighbor discovery option type of its sibling in RFC 5568 Section 6.4.1. Errata ID 1816 (verified) corrects it to the IANA-assigned mobility option type34, which is what this handler is registered against.- Parameters:
schema (
IPv6AddressPrefixOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_alt_ipv4_coa(schema, *, options)[source]¶
Read MH alternate IPv4 care-of address option.
Structure of MH Alternate IPv4 Care-of Address option [RFC 6463 Section 4.4]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Alternate IPv4 Care-of Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
AlternateIPv4CareofAddressOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_ams4(schema, *, options)[source]¶
Read MH active multicast subscription IPv4 option.
Structure of MH Active Multicast Subscription IPv4 option [RFC 7161 Section 6.1]:
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 | IGMP Type | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Multicast Membership Context + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
The membership context is an IGMP group address (RFC 1112, RFC 2236) or an IGMPv3 group record (RFC 3376 Section 4.2), which belong to IGMP rather than to the mobility header, so they are recorded opaquely.
igmp_typesays which:0x12IGMPv1,0x16IGMPv2,0x22IGMPv3.- Parameters:
schema (
ActiveMulticastSubscriptionIPv4Option) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_ams6(schema, *, options)[source]¶
Read MH active multicast subscription IPv6 option.
Structure of MH Active Multicast Subscription IPv6 option [RFC 7161 Section 4.1.2]:
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 | MLD Type | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Multicast Membership Context + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
For MLDv2 the context is an RFC 3810 Section 5.2 multicast address record; for MLDv1 it is a reserved word followed by a multicast address [RFC 7161 Section 4.1.3]. Both belong to MLD, so the context is recorded opaquely and
mld_typesays which form it is in.- Parameters:
schema (
ActiveMulticastSubscriptionIPv6Option) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_anchored(schema, *, options)[source]¶
Read MH anchored prefix option.
Structure of MH Anchored Prefix option [RFC 8885 Section 4.3]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Anchored Prefix + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters:
schema (
AnchoredPrefixOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_ani(schema, *, options)[source]¶
Read MH access network identifier option.
Structure of MH Access Network Identifier option [RFC 6757 Section 3]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... ANI Sub-option(s) ... ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
Unlike most options carrying sub-options, this one has no reserved octet between its own length and the first sub-option [RFC 6757 Section 3], and it must carry at least one.
IANA names the sub-option registry “Access Network Information” while the RFC’s prose says “Identifier”; they are the same registry.
- Parameters:
schema (
AccessNetworkIdentifierOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_att(schema, *, options)[source]¶
Read MH access technology type option.
Structure of MH Access Technology Type option [RFC 5213 Section 8.5]:
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 (R) | ATT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
RFC 5213 itself defines only access types
0through5. Values6through13were registered directly with IANA against 3GPP and 3GPP2 specifications rather than through an updating RFC, andAccessTypecarries all of them.- Parameters:
schema (
AccessTechnologyTypeOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_bid(schema, *, options)[source]¶
Read MH binding identifier (BID) option.
Structure of MH Binding Identifier option [RFC 5648 Section 4.3, as updated by RFC 6089 Section 4.1]:
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 = 35 | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Binding ID (BID) | Status |H| BID-PRI | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-------------------------------+ + + : IPv4 or IPv6 Care-of Address (CoA) : + + +---------------------------------------------------------------+Note
The care-of address is absent for a length of
4, an IPv4 address for8and an IPv6 address for20; no other length is valid and the option carries no address-family flag, so the length is the only thing to branch on [RFC 5648 Section 4.3].RFC 6089 Section 4.1 renames the seven bits below the
Hflag fromReservedtoBID-PRI, a binding priority in which0marks a sender predating RFC 6089. The newer reading is used, since a zero reads identically either way.- Parameters:
schema (
BindingIdentifierOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_cr(schema, *, options)[source]¶
Read MH context request option.
Structure of MH Context Request option [RFC 5949 Section 6.2.1]:
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 | Reserved | +---------------+---------------+-------------------------------+ | Req-type-1 | Req-length-1 | Req-type-2 | Req-length-2 | +---------------------------------------------------------------+ | Req-type-3 | Req-length-3 | Req-option-3 | +---------------------------------------------------------------+ | ... |
Note
The requested types are drawn from the mobility option registry itself, so a request for a vendor specific option (type
19) is followed by five octets naming the vendor and sub-type, whereas a request for a home network prefix (type22) carries a request length of zero. There is neither a count field nor a terminator: the list runs to the end of the option.- Parameters:
schema (
ContextRequestOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_dlif_lla(schema, *, options)[source]¶
Read MH DLIF link-local address option.
Structure of MH DLIF Link-Local Address option [RFC 8885 Section 4.7]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + DLIF Link-Local Address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Parameters:
schema (
DLIFLinkLocalAddressOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_dlif_lladdr(schema, *, options)[source]¶
Read MH DLIF link-layer address option.
Structure of MH DLIF Link-Layer Address option [RFC 8885 Section 4.8]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + DLIF Link-Layer Address + . ... . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
The address is encoded as in RFC 4861 Section 4.6.2, whose width is link-type dependent, so no fixed length can be checked here. RFC 8885 Section 4.8 says outright that the option cannot be used on links where a link-layer address is unavailable.
- Parameters:
schema (
DLIFLinkLayerAddressOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_dmnp(schema, *, options)[source]¶
Read MH delegated mobile network prefix option.
Structure of MH Delegated Mobile Network Prefix option [RFC 7148 Section 4.1]:
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 |V| Reserved | Prefix Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | . . + IPv4 or IPv6 Delegated Mobile Network Prefix + | (DMNP) | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
Unlike the binding identifier and target care-of address, this option does carry an address-family flag, so the
Vbit rather than the option length is what selects the prefix width [RFC 7148 Section 4.1]. The two are checked against each other, since a disagreement leaves the option unreadable.- Parameters:
schema (
DelegatedMNPOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_dns(schema, *, options)[source]¶
Read MH DNS-UPDATE-TYPE option.
Structure of MH DNS-UPDATE-TYPE option [RFC 5026 Section 8.1]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Status |R| Reserved | MN identity (FQDN) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
The status field draws from the Status Codes (DNS Update Mobility Option) registry that RFC 5026 Section 10 creates, not from the general mobility status codes, which is why it is typed
DNSStatusCode.The identity is kept as
bytesrather than decoded tostr, because the RFC says only “FQDN format” without saying whether that means the presentation form or the length-prefixed label form of RFC 1035.- Parameters:
schema (
DNSUpdateOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_fid(schema, *, options)[source]¶
Read MH flow identification mobility option.
Structure of MH Flow Identification mobility option [RFC 6089 Section 4.2]:
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 Len | FID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FID-PRI | Reserved | Status | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sub-options (optional) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
The status draws from the Flow Identification Mobility Option Status Codes registry, which is neither the general mobility status codes nor the flow binding acknowledgement ones – three similarly named registries that must not be confused.
- Parameters:
schema (
FlowIdentificationOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_fs(schema, *, options)[source]¶
Read MH flow summary mobility option.
Structure of MH Flow Summary mobility option [RFC 6089 Section 4.2.2]:
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 Len | FID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FID ........ +-+-+-+-+-+-+-+-+-+-+-
Note
RFC 6089 Section 8 prints the type codes of this option and the flow identification option the wrong way round, contradicting both its own figures and the IANA registry. The figures and the registry agree that the flow summary option is type
44, which is what is registered here.- Parameters:
schema (
FlowSummaryOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_gre(schema, *, options)[source]¶
Read MH GRE key option.
Structure of MH GRE Key option [RFC 5845 Section 6.1]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | GRE Key Identifier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
The key identifier is present only when the option length is
6; a length of2says the option carries none [RFC 5845 Section 6.1]. No flag announces that, so the length is the only thing to branch on, and any other length is malformed.- Parameters:
schema (
GREKeyOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_hi(schema, *, options)[source]¶
Read MH handoff indicator option.
Structure of MH Handoff Indicator option [RFC 5213 Section 8.4]:
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 (R) | HI | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters:
schema (
HandoffIndicatorOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_hnp(schema, *, options)[source]¶
Read MH home network prefix option.
Structure of MH Home Network Prefix option [RFC 5213 Section 8.3]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Home Network Prefix + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters:
schema (
HomeNetworkPrefixOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_ipv4_ack(schema, *, options)[source]¶
Read MH IPv4 address acknowledgement option.
Structure of MH IPv4 Address Acknowledgement option [RFC 5555 Section 3.2.1]:
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 | Status |Pref-len |Res| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv4 home address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
The status field draws from the DSMIPv6 IPv4 Home Address Option Status Codes registry of RFC 5555 Section 8, which despite its name governs this option rather than the IPv4 home address option. It is not the registry the similarly shaped IPv4 Home Address Reply option of RFC 5844 uses: that one has no value
133. Nor is it the pseudo-home-address registry of RFC 5726 thatACKStatusCodecarries, whose name is the more obvious trap of the three.- Parameters:
schema (
IPv4AddressAcknowledgementOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_ipv4_coa(schema, *, options)[source]¶
Read MH IPv4 care-of address option.
Structure of MH IPv4 Care-of Address option [RFC 5555 Section 3.1.2]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv4 Care-of address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
Unlike the IPv4 home address option, the whole half-word before the address is reserved – there is no prefix length and no
Pflag carved out of it.- Parameters:
schema (
IPv4CareofAddressOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_ipv4_dhcp(schema, *, options)[source]¶
Read MH IPv4 DHCP support mode option.
Structure of MH IPv4 DHCP Support Mode option [RFC 5844 Section 3.3.4]:
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 (R) |S| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
The
Sbit is the last bit of the option, not the first – the reserved field precedes it rather than following it, which is the other way round from every other flag in this module.- Parameters:
schema (
IPv4DHCPSupportModeOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_ipv4_hoa(schema, *, options)[source]¶
Read MH IPv4 home address option.
Structure of MH IPv4 Home Address option [RFC 5555 Section 3.1.1]:
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 |Prefix-len |P| Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv4 home address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
A prefix length of
32means a single address rather than a prefix, and0is invalid [RFC 5555 Section 3.1.1].- Parameters:
schema (
IPv4HomeAddressOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_ipv4_hoa_rep(schema, *, options)[source]¶
Read MH IPv4 home address reply option.
Structure of MH IPv4 Home Address Reply option [RFC 5844 Section 3.3.2]:
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 | Status |Pref-len |Res| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv4 home address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
The status draws from the IPv4 Home Address Reply Status Codes registry of RFC 5844 Section 6, which is not the DSMIPv6 one the identically shaped IPv4 address acknowledgement option of RFC 5555 uses – that registry additionally defines
133.- Parameters:
schema (
IPv4HomeAddressReplyOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_ipv4_hoa_req(schema, *, options)[source]¶
Read MH IPv4 home address request option.
Structure of MH IPv4 Home Address Request option [RFC 5844 Section 3.3.1]:
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 |Prefix-len | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv4 home address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
Unlike the IPv4 home address option of RFC 5555 Section 3.1.1, which this otherwise resembles, there is no
Pflag – the reserved field is 10 bits rather than 9.- Parameters:
schema (
IPv4HomeAddressRequestOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_ipv4_router(schema, *, options)[source]¶
Read MH IPv4 default-router address option.
Structure of MH IPv4 Default-Router Address option [RFC 5844 Section 3.3.3]:
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 (R) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv4 Default-Router Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters:
schema (
IPv4DefaultRouterAddressOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_lcmp(schema, *, options)[source]¶
Read MH LMA-controlled MAG parameters option.
Structure of MH LMA-Controlled MAG Parameters option [RFC 8127 Section 3]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LCMP Sub-Option(s) ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
This option is registered to RFC 8127, not to RFC 7864 – the latter defines the flow-mobility sub-options and the
FLOW-MOBILITYupdate notification reason instead. The IANA registry is the authority, and it cites RFC 8127.- Parameters:
schema (
LMAControlledMAGParametersOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_lla_addr(schema, *, options)[source]¶
Read MH link-local address option.
Structure of MH Link-local Address option [RFC 5213 Section 8.7]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Link-local Address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
RFC 6543 reserves
0200:5EFF:FE00:5213as the interface identifier a mobile access gateway may use here when it does not vary the address per access link. That changes which values are expected, not the option’s shape.- Parameters:
schema (
LinkLocalAddressOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_lma_up(schema, *, options)[source]¶
Read MH LMA user-plane address option.
Structure of MH LMA User-Plane Address option [RFC 7389 Section 4]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | . . + LMA User-Plane Address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
The address may legitimately be absent: a mobile access gateway sends the option with no address, or with an all-zero one, purely to say which transport it wants [RFC 7389 Section 4]. Only a local mobility anchor’s reply is required to carry a real address.
- Parameters:
schema (
LMAUserPlaneAddressOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_lmaa(schema, *, options)[source]¶
Read MH local mobility anchor address option.
Structure of MH Local Mobility Anchor Address option [RFC 5949 Section 6.2.2]:
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-Code | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Local Mobility Anchor Address ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The option codes are enumerated in
LMAAddressCode, which is local to this module because RFC 5949 defines them inline with no IANA registry behind them.- Parameters:
schema (
LMAAddressOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_load(schema, *, options)[source]¶
Read MH load information mobility option.
Structure of MH Load Information mobility option [RFC 6463 Section 4.3]:
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 | Priority | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sessions in Use | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Maximum Sessions | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Used Capacity | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Maximum Capacity | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
The two capacity fields are in kilobytes per second, unlike the quality-of-service bit rates, which are in bits per second [RFC 6463 Section 4.3].
- Parameters:
schema (
LoadInformationOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_local_prefix(schema, *, options)[source]¶
Read MH local prefix option.
Structure of MH Local Prefix option [RFC 8885 Section 4.4]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Local Prefix + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters:
schema (
LocalPrefixOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_mag_addr(schema, *, options)[source]¶
Read MH MAG IPv6 address option.
Structure of MH MAG IPv6 Address option [RFC 6705 Section 11.1]:
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 | Address Length| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + MAG IPv6 Address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
The option is modelled on the home network prefix option, which is why it carries an address length field at all; RFC 6705 Section 11.1 requires it to be
128, since a full address is always carried.- Parameters:
schema (
MAGIPv6AddressOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_mag_id(schema, *, options)[source]¶
Read MH MAG identifier option.
Structure of MH MAG Identifier option [RFC 8278 Section 4.2]:
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 | Subtype | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identifier ... ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
The sub-type is borrowed from the mobile node identifier subtype registry [RFC 4283, RFC 8371], so the identifier’s encoding is whatever that subtype prescribes. RFC 8278 does not restate those encodings, so the identifier is kept as
bytes.- Parameters:
schema (
MAGIdentifierOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_mag_mp(schema, *, options)[source]¶
Read MH MAG multipath binding option.
Structure of MH MAG Multipath Binding option [RFC 8278 Section 4.1]:
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 | If-ATT | If-Label | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Binding ID |B|O| Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
RFC 8278 Section 4.1 makes the
BandOflags mutually exclusive – neither may be set while the other is – and reserves binding identifiers0and255.- Parameters:
schema (
MAGMultipathBindingOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_mcast(schema, *, options)[source]¶
Read MH multicast mobility option.
Structure of MH Multicast Mobility option [RFC 7411 Section 5.3]:
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 | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | MLD or IGMP Report Payload | ~ ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
This option’s length field is not the usual octet count. RFC 7411 Section 5.3 measures it in 32-bit words and excludes the option code and reserved octets as well as the type and length ones, so the option occupies
4 + length * 4octets rather thanlength + 2. The option-collection machinery advances by the octets the schema actually consumed rather than by the declared length, so the unusual unit does not misframe the options that follow – but it does meanlengthhere is the true octet count, computed rather than copied.- Parameters:
schema (
MulticastMobilityOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_mcast_ack(schema, *, options)[source]¶
Read MH multicast acknowledgement option.
Structure of MH Multicast Acknowledgement option [RFC 7411 Section 5.4]:
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 | Status | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | MLD or IGMP Unsupported Report Payload | ~ ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
As with
_read_opt_mcast(), the length counts 32-bit words and excludes the option code and status octets [RFC 7411 Section 5.4].- Parameters:
schema (
MulticastAcknowledgementOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_mcast_sel(schema, *, options)[source]¶
Read MH dynamic IP multicast selector option.
Structure of MH Dynamic IP Multicast Selector option [RFC 7028 Section 5.1.2]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Protocol |M| Reserved |Nr of Mcast Address Records (N)| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Multicast Address Record [1] + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . . . +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Multicast Address Record [N] + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
The address records are RFC 3810 Section 5.2 MLD or RFC 3376 Section 4.2 IGMP structures. They belong to those protocols rather than to the mobility header, and each is self-describing through its own auxiliary-data length and source count, so they are recorded opaquely here rather than half-decoded.
protocolsays which of the two they are:143for MLDv2,131for MLDv1.- Parameters:
schema (
DynamicIPMulticastSelectorOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_mn_group(schema, *, options)[source]¶
Read MH mobile node group identifier option.
Structure of MH Mobile Node Group Identifier option [RFC 6602 Section 4.3]:
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 | Sub-type | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Mobile Node Group Identifier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters:
schema (
MNGroupIdentifierOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_mn_lla_iid(schema, *, options)[source]¶
Read MH mobile node link-local address interface identifier option.
Structure of MH Mobile Node Link-local Address Interface Identifier option [RFC 5949 Section 6.2.3]:
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 | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Interface Identifier + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters:
schema (
MNLLAIIDOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_mn_lli(schema, *, options)[source]¶
Read MH mobile node link-layer identifier option.
Structure of MH Mobile Node Link-layer Identifier option [RFC 5213 Section 8.6]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Link-layer Identifier + . ... . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
The identifier’s octet and bit ordering is that of RFC 4861 Section 4.6, but only the address encoding is borrowed from there – the option keeps its own mobility-option framing, in which the length is in octets rather than in the 8-octet units neighbour discovery uses.
- Parameters:
schema (
MNLLIdentifierOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_nat(schema, *, options)[source]¶
Read MH NAT detection option.
Structure of MH NAT Detection option [RFC 5555 Section 3.2.2]:
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 |F| Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Refresh time | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
A refresh time of
0means the field is to be ignored, and all ones that no keep-alives are needed [RFC 5555 Section 3.2.2]. Both are representable as atimedelta, so the raw value is recoverable from it without being stored twice.- Parameters:
schema (
NATDetectionOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_offload(schema, *, options)[source]¶
Read MH IPv4 traffic offload selector option.
Structure of MH IPv4 Traffic Offload Selector option [RFC 6909 Section 3.1]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |M| Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Traffic Selector Sub-option ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
The traffic selector it carries is the flow identification sub-option of RFC 6089 Section 4.2.1.4, so it is read through the same sub-option registry rather than through one of its own. It is optional in a proxy binding update and mandatory in a proxy binding acknowledgement, hence a collection rather than a single value.
- Parameters:
schema (
IPv4TrafficOffloadSelectorOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_prev_maar(schema, *, options)[source]¶
Read MH previous MAAR option.
Structure of MH Previous MAAR option [RFC 8885 Section 4.5]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Previous MAAR + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Home Network Prefix + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
The prefix length applies to the home network prefix only; the previous MAAR’s own field is a full address [RFC 8885 Section 4.5].
- Parameters:
schema (
PreviousMAAROption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_qos(schema, *, options)[source]¶
Read MH quality-of-service option.
Structure of MH Quality-of-Service option [RFC 7222 Section 4.1]:
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 | SR-ID | TC | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | OC | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ QoS Attribute(s) ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
The traffic class octet is a 6-bit differentiated services code point with two reserved bits below it, so only the code point is carried into the data model.
- Parameters:
schema (
QualityOfServiceOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_rc(schema, *, options)[source]¶
Read MH redirect-capability mobility option.
Structure of MH Redirect-Capability mobility option [RFC 6463 Section 4.1]:
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 | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Parameters:
schema (
RedirectCapabilityOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_redirect(schema, *, options)[source]¶
Read MH redirect mobility option.
Structure of MH Redirect mobility option [RFC 6463 Section 4.2]:
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 |K|N| Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Optional IPv6 r2LMA Address | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Optional IPv4 r2LMA Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
RFC 6463 Section 4.2 forbids
KandNfrom being both set and both clear, so exactly one address is present and the option length is 18 or 6 accordingly. The two encodings of the same fact are checked against each other here, since a disagreement means the option cannot be read either way.- Parameters:
schema (
RedirectOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_restart(schema, *, options)[source]¶
Read MH restart counter option.
Structure of MH Restart Counter option [RFC 5847 Section 3.4]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Restart Counter | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
RFC 5847 Section 3.4 says this option is valid only in a heartbeat response. That is a constraint on the sender rather than on the wire format, so it is not enforced here – a capture carries whatever it carries.
- Parameters:
schema (
RestartCounterOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_serv_maar(schema, *, options)[source]¶
Read MH serving MAAR option.
Structure of MH Serving MAAR option [RFC 8885 Section 4.6]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + S-MAAR's Address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
Unlike the anchored and local prefix options, this one has neither a reserved octet nor a prefix length – it carries a full address and nothing else.
- Parameters:
schema (
ServingMAAROption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_service(schema, *, options)[source]¶
Read MH service selection mobility option.
Structure of MH Service Selection mobility option [RFC 5149 Section 3]:
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 = 20 | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identifier... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
Unlike the DNS identity of
_read_opt_dns(), this identifier is decoded tostr: RFC 5149 Section 3 states outright that it is UTF-8 and NFKC-normalised. A length of zero is invalid.- Parameters:
schema (
ServiceSelectionOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_timestamp(schema, *, options)[source]¶
Read MH timestamp option.
Structure of MH Timestamp option [RFC 5213 Section 8.8]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Timestamp + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
This is not the RFC 1305 NTP timestamp that
_read_opt_mesg_id()reads, and the two must not be conflated. RFC 5213 Section 8.8 counts seconds from the UNIX epoch, not NTP’s 1900 one, and splits the 64 bits 48/16 rather than 32/32. Reading it as an NTP timestamp would be wrong in both the epoch and the field widths, which is why it gets its ownPMIPv6Timestamp.- Parameters:
schema (
TimestampOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_transient(schema, *, options)[source]¶
Read MH transient binding option.
Structure of MH Transient Binding option [RFC 6058 Section 5.1]:
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 |L| Lifetime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
The lifetime is in units of 100 milliseconds, which is unlike every other lifetime in this module [RFC 6058 Section 5.1]. The
Lflag is the last bit of the third octet, with the seven reserved bits above rather than below it.- Parameters:
schema (
TransientBindingOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _read_opt_vendor(schema, *, options)[source]¶
Read MH vendor specific mobility option.
Structure of MH Vendor Specific mobility option [RFC 5094 Section 3]:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Vendor ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sub-Type | Data....... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Note
The vendor ID is an SMI Network Management Private Enterprise Number, whose space is unbounded, so it is not enumerated. The sub-type is administered by that vendor rather than by IANA, so it is not enumerated either.
- Parameters:
schema (
VendorSpecificOption) – Parsed option schema.options (
OrderedMultiDict[Option,Option]) – Parsed MH options.
- Return type:
- Returns:
Constructed option data.
- _make_fid_suboptions(suboptions)[source]¶
Make MH flow identification sub-options.
- Parameters:
suboptions (
OrderedMultiDict[FlowIDSuboption,FlowIdentificationSuboption] |list[FlowIdentificationSuboption|tuple[FlowIDSuboption,dict[str,Any]] |bytes]) – Sub-options, as parsed data, schemas,(type, kwargs)pairs, or raw octets.- Return type:
- Returns:
Sub-option schema list.
- _make_fid_suboption(code, option=None, **kwargs)[source]¶
Make one MH flow identification sub-option.
- Parameters:
code (
FlowIDSuboption) – Sub-option type.option (
FlowIdentificationSuboption|None) – Sub-option data model.**kwargs (
Any) – Sub-option fields, when no data model is given.
- Return type:
- Returns:
Constructed sub-option schema.
Note
The data model parameter is named
optionrather thandatato match_make_opt_fid()and the rest of this module – and because naming itdatamade it shadow a field. The traffic selector and unassigned sub-options both carry a field of their own calleddata, so a caller’sdata=bound to the model parameter instead of landing in**kwargs, and thekwargs.get('data')fallback below could never see it: the payload was silently dropped and the length written as though it were empty. No exception, just a lost field.Dispatch is on
coderather than onisinstanceof the schema or data class, for the reason given in_read_fid_suboptions().
- _make_ani_suboptions(suboptions)[source]¶
Make MH access network identifier sub-options.
- Parameters:
suboptions (
OrderedMultiDict[ANISuboption,ANISuboption] |list[ANISuboption|tuple[ANISuboption,dict[str,Any]] |bytes]) – Sub-options, as parsed data, schemas,(type, kwargs)pairs, or raw octets.- Return type:
- Returns:
Sub-option schema list.
- _make_ani_suboption(code, option=None, **kwargs)[source]¶
Make one MH access network identifier sub-option.
- Parameters:
code (
ANISuboption) – Sub-option type.option (
ANISuboption|None) – Sub-option data model.**kwargs (
Any) – Sub-option fields, when no data model is given.
- Return type:
- Returns:
Constructed sub-option schema.
Note
The geo-location degrees are re-encoded from the raw signed integers rather than from the decoded floats, since a float cannot always be converted back to the same 24-bit fixed-point value.
The data model parameter is named
optionrather thandataso that it cannot shadow a sub-option field of that name – see_make_fid_suboption(), where it did. Dispatch is oncoderather than onisinstance, for the reason given in_read_fid_suboptions().
- _make_qos_attributes(attributes)[source]¶
Make MH quality-of-service attributes.
- Parameters:
attributes (
OrderedMultiDict[QoSAttribute,QoSAttribute] |list[QoSAttribute|tuple[QoSAttribute,dict[str,Any]] |bytes]) – Attributes, as parsed data, schemas,(type, kwargs)pairs, or raw octets.- Return type:
- Returns:
Attribute schema list.
- _make_qos_attribute(code, option=None, **kwargs)[source]¶
Make one MH quality-of-service attribute.
- Parameters:
code (
QoSAttribute) – Attribute type.option (
QoSAttribute|None) – Attribute data model.**kwargs (
Any) – Attribute fields, when no data model is given.
- Return type:
- Returns:
Constructed attribute schema.
Note
The data model parameter is named
optionrather thandata, and that is not cosmetic. The vendor-specific attribute of RFC 7222 Section 4.2.11 has a field of its own calleddata, so with the parameter nameddataa caller’sdata=bound to the model parameter instead of reaching**kwargs– and thekwargs.get('data')fallback then always saw nothing. Building the attribute the natural way, mirroring the data model’s own field names, silently dropped the vendor payload and wrote the length as though it were empty.vendorandsubtypesurvived because those names do not collide, which made the loss look like a partial success rather than a bug.Dispatch is on
coderather than onisinstance, for the reason given in_read_fid_suboptions().
- _make_lcmp_suboptions(suboptions)[source]¶
Make MH LMA-controlled MAG parameters sub-options.
- Parameters:
suboptions (
OrderedMultiDict[LMAControlledMAGSuboption,LMAControlledMAGSuboption] |list[LMAControlledMAGSuboption|tuple[LMAControlledMAGSuboption,dict[str,Any]] |bytes]) – Sub-options, as parsed data, schemas,(type, kwargs)pairs, or raw octets.- Return type:
- Returns:
Sub-option schema list.
- _make_lcmp_suboption(code, option=None, **kwargs)[source]¶
Make one MH LMA-controlled MAG parameters sub-option.
- Parameters:
code (
LMAControlledMAGSuboption) – Sub-option type.option (
LMAControlledMAGSuboption|None) – Sub-option data model.**kwargs (
Any) – Sub-option fields, when no data model is given.
- Return type:
- Returns:
Constructed sub-option schema.
Note
The data model parameter is named
optionrather thandataso that it cannot shadow a sub-option field of that name – see_make_fid_suboption(), where it did. Dispatch is oncoderather than onisinstance, for the reason given in_read_fid_suboptions().
- _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_pad(type, option=None, *, length=0, **kwargs)[source]¶
Make MH pad option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
Note
Data_PadOption.lengthcounts the whole option, whereasSchema_PadOption.lengthis theOption Lengthfield – two octets fewer, and absent altogether for aPad1. Copying one into the other unconverted is why re-making a parsedPadNused to come back two octets too long.
- _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|timedelta) – Refresh interval before re-registration, in units of 4 seconds or as atimedelta[RFC 6275 Section 6.2.4].**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. Anintis accepted for every subtype exceptNAI, with the sole exception of abool, which is rejected for every subtype – seeRaisesbelow. ForIPv6_Addressit is converted and validated the same way as any other valueipaddress.IPv6Addressaccepts. For the other six subtypes – all numeric identifiers (an IMSI, a P-TMSI, an EUI-48/64 address, a GUTI, a DUID) – it is converted to its own minimal big-endian octets, at least one.NAIis text (RFC 4283’suser@realmform) rather than a numeric identifier, so there is no non-arbitrary int-to-text mapping the way there is int-to-address or int-to-octets, and anintis rejected there (c.f. #467, #468).**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- Raises:
ProtocolError – If
identifieris abool, for any subtype –boolis anintsubclass, soTruewould otherwise be converted by two different paths below, to::1forIPv6_Addressand to a one-octet identifier for the other six, neither of which a caller passing a flag can plausibly have meant; passint(...)to get the numeric value (c.f. #469). Ifidentifieris a negativeint(no subtype has a wire form for one), anintof any value with theNAIsubtype, anintof2**128or above with theIPv6_Addresssubtype (whose wire form is a fixed 16 octets, unlike the other subtypes, which have no ceiling and simply pack into more), oridentifieris of a type its subtype’s field cannot hold at all: anything butstrforNAI, anything butbytes/bytearray/intfor the other six – anintis converted rather than rejected there, per #468 – or anythingipaddress.IPv6Addressitself does not accept forIPv6_Address(c.f. #469).
- _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.
- _make_opt_exp(type, option=None, *, data=b'', **kwargs)[source]¶
Make MH experimental mobility option.
- Parameters:
type (
Option) – Option type.option (
ExperimentalMobilityOption|None) – Option data model.data (
bytes) – Experimental data.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_badf(type, option=None, *, spi=0, data=b'', **kwargs)[source]¶
Make MH binding authorization data for FMIPv6 (BADF) option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
Note
The
lengthfield counts the authenticator only, excluding the SPI, c.f.,_read_opt_badf().
- _make_opt_ipv6_ap(type, option=None, *, code=<IPv6AddressPrefixCode.New_Care_of_Address: 2>, code_default=None, code_namespace=None, code_reversed=False, prefix_length=128, address='::', **kwargs)[source]¶
Make MH mobility header IPv6 address/prefix option.
- Parameters:
type (
Option) – Option type.option (
IPv6AddressPrefixOption|None) – Option data model.code (
IPv6AddressPrefixCode|IntEnum|IntEnum|str|int) – Option code, c.f.,IPv6AddressPrefixCode.code_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Option code namespace.code_reversed (
bool) – Reverse option code namespace.prefix_length (
int) – Prefix length.address (
bytes|str|int|IPv6Address) – IPv6 address/prefix.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_alt_ipv4_coa(type, option=None, *, address='0.0.0.0', **kwargs)[source]¶
Make MH alternate IPv4 care-of address option.
- Parameters:
type (
Option) – Option type.option (
AlternateIPv4CareofAddressOption|None) – Option data model.address (
bytes|str|int|IPv4Address) – Alternate IPv4 care-of address.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_ams4(type, option=None, *, igmp_type=34, context=b'', **kwargs)[source]¶
Make MH active multicast subscription IPv4 option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
- _make_opt_ams6(type, option=None, *, mld_type=143, context=b'', **kwargs)[source]¶
Make MH active multicast subscription IPv6 option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
- _make_opt_anchored(type, option=None, *, prefix_length=64, prefix='::', **kwargs)[source]¶
Make MH anchored prefix option.
- Parameters:
type (
Option) – Option type.option (
AnchoredPrefixOption|None) – Option data model.prefix_length (
int) – Prefix length.prefix (
bytes|str|int|IPv6Address) – Anchored prefix.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_ani(type, option=None, *, suboptions=None, **kwargs)[source]¶
Make MH access network identifier option.
- Parameters:
type (
Option) – Option type.option (
AccessNetworkIdentifierOption|None) – Option data model.suboptions (
OrderedMultiDict[ANISuboption,ANISuboption] |list[ANISuboption|tuple[ANISuboption,dict[str,Any]] |bytes] |None) – Sub-options; at least one is required.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_att(type, option=None, *, att=<AccessType.Virtual: 1>, att_default=None, att_namespace=None, att_reversed=False, **kwargs)[source]¶
Make MH access technology type option.
- Parameters:
type (
Option) – Option type.option (
AccessTechnologyTypeOption|None) – Option data model.att (
AccessType|IntEnum|IntEnum|str|int) – Access technology type.att_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Access technology type namespace.att_reversed (
bool) – Reverse access technology type namespace.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_bid(type, option=None, *, bid=1, status=<StatusCode.Binding_Update_accepted_Proxy_Binding_Update_accepted: 0>, status_default=None, status_namespace=None, status_reversed=False, simultaneous=False, bid_pri=0, address=None, **kwargs)[source]¶
Make MH binding identifier (BID) option.
- Parameters:
type (
Option) – Option type.option (
BindingIdentifierOption|None) – Option data model.bid (
int) – Binding identifier.status (
StatusCode|IntEnum|IntEnum|str|int) – Status, overriding the message status for this binding alone.status_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Status namespace.status_reversed (
bool) – Reverse status namespace.simultaneous (
bool) – Simultaneous home and foreign binding flag.bid_pri (
int) – Binding priority.address (
bytes|str|int|IPv4Address|IPv6Address|None) – Care-of address, orNoneto omit it.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
Note
The option length is derived from the address family, since that is the only thing that carries it on the wire: 4 with no address, 8 for an IPv4 one and 20 for an IPv6 one [RFC 5648 Section 4.3].
- _make_opt_cr(type, option=None, *, requests=None, **kwargs)[source]¶
Make MH context request option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
- _make_opt_dlif_lla(type, option=None, *, address='::', **kwargs)[source]¶
Make MH DLIF link-local address option.
- Parameters:
type (
Option) – Option type.option (
DLIFLinkLocalAddressOption|None) – Option data model.address (
bytes|str|int|IPv6Address) – Distributed logical interface’s link-local address.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_dlif_lladdr(type, option=None, *, lla=b'', **kwargs)[source]¶
Make MH DLIF link-layer address option.
- Parameters:
type (
Option) – Option type.option (
DLIFLinkLayerAddressOption|None) – Option data model.lla (
bytes) – Distributed logical interface’s link-layer address.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_dmnp(type, option=None, *, prefix_length=64, prefix='::', **kwargs)[source]¶
Make MH delegated mobile network prefix option.
- Parameters:
type (
Option) – Option type.option (
DelegatedMNPOption|None) – Option data model.prefix_length (
int) – Prefix length.prefix (
bytes|str|int|IPv4Address|IPv6Address) – Delegated mobile network prefix.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
Note
The
Vflag is derived from the prefix’s own family rather than taken as an argument, so that the flag and the emitted width cannot disagree.
- _make_opt_dns(type, option=None, *, status=<DNSStatusCode.DNS_update_performed: 0>, status_default=None, status_namespace=None, status_reversed=False, remove=False, identity=b'', **kwargs)[source]¶
Make MH DNS-UPDATE-TYPE option.
- Parameters:
type (
Option) – Option type.option (
DNSUpdateOption|None) – Option data model.status (
DNSStatusCode|IntEnum|IntEnum|str|int) – Status.status_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Status namespace.status_reversed (
bool) – Reverse status namespace.remove (
bool) – Remove flag.identity (
bytes) – Mobile node identity, in FQDN form.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_fid(type, option=None, *, fid=1, fid_pri=1, status=<FlowIDStatus.Flow_binding_successful: 0>, status_default=None, status_namespace=None, status_reversed=False, suboptions=None, **kwargs)[source]¶
Make MH flow identification mobility option.
- Parameters:
type (
Option) – Option type.option (
FlowIdentificationOption|None) – Option data model.fid (
int) – Flow identifier.fid_pri (
int) – Flow priority.status (
FlowIDStatus|IntEnum|IntEnum|str|int) – Status.status_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Status namespace.status_reversed (
bool) – Reverse status namespace.suboptions (
OrderedMultiDict[FlowIDSuboption,FlowIdentificationSuboption] |list[FlowIdentificationSuboption|tuple[FlowIDSuboption,dict[str,Any]] |bytes] |None) – Sub-options.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_fs(type, option=None, *, fid=None, **kwargs)[source]¶
Make MH flow summary mobility option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
- _make_opt_gre(type, option=None, *, key=None, **kwargs)[source]¶
Make MH GRE key option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
- _make_opt_hi(type, option=None, *, hi=<HandoffType.Attachment_over_a_new_interface: 1>, hi_default=None, hi_namespace=None, hi_reversed=False, **kwargs)[source]¶
Make MH handoff indicator option.
- Parameters:
type (
Option) – Option type.option (
HandoffIndicatorOption|None) – Option data model.hi (
HandoffType|IntEnum|IntEnum|str|int) – Handoff indicator.hi_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Handoff indicator namespace.hi_reversed (
bool) – Reverse handoff indicator namespace.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_hnp(type, option=None, *, prefix_length=64, prefix='::', **kwargs)[source]¶
Make MH home network prefix option.
- Parameters:
type (
Option) – Option type.option (
HomeNetworkPrefixOption|None) – Option data model.prefix_length (
int) – Prefix length.prefix (
bytes|str|int|IPv6Address) – Home network prefix.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_ipv4_ack(type, option=None, *, status=<DSMIPv6HomeAddress.Success: 0>, status_default=None, status_namespace=None, status_reversed=False, prefix_length=32, address='0.0.0.0', **kwargs)[source]¶
Make MH IPv4 address acknowledgement option.
- Parameters:
type (
Option) – Option type.option (
IPv4AddressAcknowledgementOption|None) – Option data model.status (
DSMIPv6HomeAddress|IntEnum|IntEnum|str|int) – Status.status_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Status namespace.status_reversed (
bool) – Reverse status namespace.prefix_length (
int) – Allocated prefix length.address (
bytes|str|int|IPv4Address) – Assigned IPv4 home address.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_ipv4_coa(type, option=None, *, address='0.0.0.0', **kwargs)[source]¶
Make MH IPv4 care-of address option.
- Parameters:
type (
Option) – Option type.option (
IPv4CareofAddressOption|None) – Option data model.address (
bytes|str|int|IPv4Address) – IPv4 care-of address.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_ipv4_dhcp(type, option=None, *, mode=<DHCPSupportMode.Unassigned_0x0: 0>, mode_default=None, mode_namespace=None, mode_reversed=False, **kwargs)[source]¶
Make MH IPv4 DHCP support mode option.
- Parameters:
type (
Option) – Option type.option (
IPv4DHCPSupportModeOption|None) – Option data model.mode (
DHCPSupportMode|IntEnum|IntEnum|str|int) – DHCP support mode.mode_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – DHCP support mode namespace.mode_reversed (
bool) – Reverse DHCP support mode namespace.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_ipv4_hoa(type, option=None, *, prefix_length=32, address='0.0.0.0', request_prefix=False, **kwargs)[source]¶
Make MH IPv4 home address option.
- Parameters:
type (
Option) – Option type.option (
IPv4HomeAddressOption|None) – Option data model.prefix_length (
int) – Prefix length;32for a single address.address (
bytes|str|int|IPv4Address) – IPv4 home address.request_prefix (
bool) – Mobile network prefix request flag.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_ipv4_hoa_rep(type, option=None, *, status=<HomeAddressReply.Success: 0>, status_default=None, status_namespace=None, status_reversed=False, prefix_length=32, address='0.0.0.0', **kwargs)[source]¶
Make MH IPv4 home address reply option.
- Parameters:
type (
Option) – Option type.option (
IPv4HomeAddressReplyOption|None) – Option data model.status (
HomeAddressReply|IntEnum|IntEnum|str|int) – Status.status_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Status namespace.status_reversed (
bool) – Reverse status namespace.prefix_length (
int) – Prefix length of the assigned home network.address (
bytes|str|int|IPv4Address) – Assigned IPv4 home address.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_ipv4_hoa_req(type, option=None, *, prefix_length=32, address='0.0.0.0', **kwargs)[source]¶
Make MH IPv4 home address request option.
- Parameters:
type (
Option) – Option type.option (
IPv4HomeAddressRequestOption|None) – Option data model.prefix_length (
int) – Prefix length of the requested home network.address (
bytes|str|int|IPv4Address) – Requested IPv4 home address.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_ipv4_router(type, option=None, *, address='0.0.0.0', **kwargs)[source]¶
Make MH IPv4 default-router address option.
- Parameters:
type (
Option) – Option type.option (
IPv4DefaultRouterAddressOption|None) – Option data model.address (
bytes|str|int|IPv4Address) – IPv4 default-router address.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_lcmp(type, option=None, *, suboptions=None, **kwargs)[source]¶
Make MH LMA-controlled MAG parameters option.
- Parameters:
type (
Option) – Option type.option (
LMAControlledMAGParametersOption|None) – Option data model.suboptions (
OrderedMultiDict[LMAControlledMAGSuboption,LMAControlledMAGSuboption] |list[LMAControlledMAGSuboption|tuple[LMAControlledMAGSuboption,dict[str,Any]] |bytes] |None) – Sub-options; at least one is required.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_lla_addr(type, option=None, *, address='::', **kwargs)[source]¶
Make MH link-local address option.
- Parameters:
type (
Option) – Option type.option (
LinkLocalAddressOption|None) – Option data model.address (
bytes|str|int|IPv6Address) – Link-local address.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_lma_up(type, option=None, *, address=None, **kwargs)[source]¶
Make MH LMA user-plane address option.
- Parameters:
type (
Option) – Option type.option (
LMAUserPlaneAddressOption|None) – Option data model.address (
bytes|str|int|IPv4Address|IPv6Address|None) – LMA user-plane address, orNoneto omit it – which is how a mobile access gateway asks for a transport without naming an address.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_lmaa(type, option=None, *, code=<LMAAddressCode.IPv6_LMAA: 1>, code_default=None, code_namespace=None, code_reversed=False, address='::', **kwargs)[source]¶
Make MH local mobility anchor address option.
- Parameters:
type (
Option) – Option type.option (
LMAAddressOption|None) – Option data model.code (
LMAAddressCode|IntEnum|IntEnum|str|int) – Option code, c.f.,LMAAddressCode.code_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Option code namespace.code_reversed (
bool) – Reverse option code namespace.address (
bytes|str|int|IPv4Address|IPv6Address) – Local mobility anchor address.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
Note
The option length is derived from the address family rather than from
code, so that the two cannot be emitted disagreeing.
- _make_opt_load(type, option=None, *, priority=0, sessions_in_use=0, max_sessions=0, used_capacity=0, max_capacity=0, **kwargs)[source]¶
Make MH load information mobility option.
- Parameters:
type (
Option) – Option type.option (
LoadInformationOption|None) – Option data model.priority (
int) – Priority; a lower value is a higher priority.sessions_in_use (
int) – Mobility sessions currently in use.max_sessions (
int) – Maximum number of mobility sessions accepted.used_capacity (
int) – Used capacity, in kilobytes per second.max_capacity (
int) – Maximum capacity, in kilobytes per second.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_local_prefix(type, option=None, *, prefix_length=64, prefix='::', **kwargs)[source]¶
Make MH local prefix option.
- Parameters:
type (
Option) – Option type.option (
LocalPrefixOption|None) – Option data model.prefix_length (
int) – Prefix length.prefix (
bytes|str|int|IPv6Address) – Local prefix.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_mag_addr(type, option=None, *, address_length=128, address='::', **kwargs)[source]¶
Make MH MAG IPv6 address option.
- Parameters:
type (
Option) – Option type.option (
MAGIPv6AddressOption|None) – Option data model.address_length (
int) – Address length, in bits; RFC 6705 Section 11.1 requires 128.address (
bytes|str|int|IPv6Address) – MAG IPv6 address.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_mag_id(type, option=None, *, subtype=<MNIDSubtype.NAI: 1>, subtype_default=None, subtype_namespace=None, subtype_reversed=False, identifier=b'', **kwargs)[source]¶
Make MH MAG identifier option.
- Parameters:
type (
Option) – Option type.option (
MAGIdentifierOption|None) – Option data model.subtype (
MNIDSubtype|IntEnum|IntEnum|str|int) – Sub-type, from the mobile node identifier subtype registry.subtype_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Sub-type namespace.subtype_reversed (
bool) – Reverse sub-type namespace.identifier (
bytes) – Identifier.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_mag_mp(type, option=None, *, att=<AccessType.Virtual: 1>, att_default=None, att_namespace=None, att_reversed=False, label=0, bid=1, bulk=False, overwrite=False, **kwargs)[source]¶
Make MH MAG multipath binding option.
- Parameters:
type (
Option) – Option type.option (
MAGMultipathBindingOption|None) – Option data model.att (
AccessType|IntEnum|IntEnum|str|int) – Interface access-technology type.att_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Access-technology type namespace.att_reversed (
bool) – Reverse access-technology type namespace.label (
int) – Interface label.bid (
int) – Binding identifier;0and255are reserved.bulk (
bool) – Bulk re-registration flag.overwrite (
bool) – Registration overwrite flag.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- Raises:
ProtocolError – If both flags are set, which RFC 8278 Section 4.1 forbids.
- _make_opt_mcast(type, option=None, *, code=2, data=b'', **kwargs)[source]¶
Make MH multicast mobility option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
- Raises:
ProtocolError – If the payload is not a whole number of 32-bit words. RFC 7411 Section 5.3 measures this option’s length in words, so a payload that is not a multiple of 4 octets cannot be described by it at all.
- _make_opt_mcast_ack(type, option=None, *, code=0, status=1, data=b'', **kwargs)[source]¶
Make MH multicast acknowledgement option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
- Raises:
ProtocolError – If the payload is not a whole number of 32-bit words.
- _make_opt_mcast_sel(type, option=None, *, protocol=143, mode=False, records=0, data=b'', **kwargs)[source]¶
Make MH dynamic IP multicast selector option.
- Parameters:
type (
Option) – Option type.option (
DynamicIPMulticastSelectorOption|None) – Option data model.protocol (
int) – MLD or IGMP protocol number identifying the record format.mode (
bool) – Selector mode flag.records (
int) – Number of multicast address records indata.data (
bytes) – Multicast address records, opaque to this module.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_mn_group(type, option=None, *, subtype=<MNGroupID.Bulk_Binding_Update_Group: 1>, subtype_default=None, subtype_namespace=None, subtype_reversed=False, group_id=1, **kwargs)[source]¶
Make MH mobile node group identifier option.
- Parameters:
type (
Option) – Option type.option (
MNGroupIdentifierOption|None) – Option data model.subtype (
MNGroupID|IntEnum|IntEnum|str|int) – Sub-type.subtype_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Sub-type namespace.subtype_reversed (
bool) – Reverse sub-type namespace.group_id (
int) – Mobile node group identifier.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_mn_lla_iid(type, option=None, *, iid=b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00', **kwargs)[source]¶
Make MH mobile node link-local address interface identifier option.
- Parameters:
type (
Option) – Option type.option (
MNLLAIIDOption|None) – Option data model.iid (
bytes) – Interface identifier; exactly 8 octets.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_mn_lli(type, option=None, *, lli=b'', **kwargs)[source]¶
Make MH mobile node link-layer identifier option.
- Parameters:
type (
Option) – Option type.option (
MNLLIdentifierOption|None) – Option data model.lli (
bytes) – Link-layer identifier.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_nat(type, option=None, *, force=False, refresh=0, **kwargs)[source]¶
Make MH NAT detection option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
- _make_opt_offload(type, option=None, *, mode=False, selector=None, **kwargs)[source]¶
Make MH IPv4 traffic offload selector option.
- Parameters:
type (
Option) – Option type.option (
IPv4TrafficOffloadSelectorOption|None) – Option data model.mode (
bool) – Offload mode flag.selector (
OrderedMultiDict[FlowIDSuboption,FlowIdentificationSuboption] |list[FlowIdentificationSuboption|tuple[FlowIDSuboption,dict[str,Any]] |bytes] |None) – Traffic selector sub-options.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_prev_maar(type, option=None, *, prefix_length=64, maar='::', prefix='::', **kwargs)[source]¶
Make MH previous MAAR option.
- Parameters:
type (
Option) – Option type.option (
PreviousMAAROption|None) – Option data model.prefix_length (
int) – Prefix length ofprefix.maar (
bytes|str|int|IPv6Address) – Previous MAAR’s global address.prefix (
bytes|str|int|IPv6Address) – Mobile node’s home network prefix.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_qos(type, option=None, *, sr_id=0, dscp=0, oc=0, attributes=None, **kwargs)[source]¶
Make MH quality-of-service option.
- Parameters:
type (
Option) – Option type.option (
QualityOfServiceOption|None) – Option data model.sr_id (
int) – Service request identifier.dscp (
int) – Differentiated services code point, 6 bits.oc (
int) – Operational code.attributes (
OrderedMultiDict[QoSAttribute,QoSAttribute] |list[QoSAttribute|tuple[QoSAttribute,dict[str,Any]] |bytes] |None) – Quality-of-service attributes.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_rc(type, option=None, **kwargs)[source]¶
Make MH redirect-capability mobility option.
- Parameters:
type (
Option) – Option type.option (
RedirectCapabilityOption|None) – Option data model.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_redirect(type, option=None, *, ipv6=None, ipv4=None, **kwargs)[source]¶
Make MH redirect mobility option.
- Parameters:
type (
Option) – Option type.option (
RedirectOption|None) – Option data model.ipv6 (
IPv6Address|str|int|bytes|None) – IPv6 address of the redirected-to local mobility anchor.ipv4 (
bytes|str|int|IPv4Address|None) – IPv4 address of the redirected-to local mobility anchor.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- Raises:
ProtocolError – If neither or both addresses are given. RFC 6463 Section 4.2 requires exactly one.
- _make_opt_restart(type, option=None, *, counter=0, **kwargs)[source]¶
Make MH restart counter option.
- Parameters:
type (
Option) – Option type.option (
RestartCounterOption|None) – Option data model.counter (
int) – Restart counter.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_serv_maar(type, option=None, *, address='::', **kwargs)[source]¶
Make MH serving MAAR option.
- Parameters:
type (
Option) – Option type.option (
ServingMAAROption|None) – Option data model.address (
bytes|str|int|IPv6Address) – Serving MAAR’s global address.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_service(type, option=None, *, identifier='', **kwargs)[source]¶
Make MH service selection mobility option.
- Parameters:
type (
Option) – Option type.option (
ServiceSelectionOption|None) – Option data model.identifier (
str) – Service identifier.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed option schema.
- _make_opt_timestamp(type, option=None, *, seconds=0, fraction=0, **kwargs)[source]¶
Make MH timestamp option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
Note
The fixed-point pair is taken from
pmip_timestamprather than recomputed fromtimestamp, since adatetimeholds microseconds and the wire format holds 1/65536ths – converting between them does not round-trip.
- _make_opt_transient(type, option=None, *, late=False, lifetime=0, **kwargs)[source]¶
Make MH transient binding option.
- Parameters:
- Return type:
- Returns:
Constructed option schema.
- _make_opt_vendor(type, option=None, *, vendor=0, subtype=0, data=b'', **kwargs)[source]¶
Make MH vendor specific mobility option.
- Parameters:
- 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.
- _read_ext_exp(schema, *, extensions)[source]¶
Read experimental CGA extension.
Structure of an experimental CGA extension [RFC 4581 Section 2, RFC 4581 Section 3]:
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 ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note
RFC 4581 Section 3 assigns extension types
0xFFFD,0xFFFEand0xFFFFfor experimental use as RFC 3692 recommends, and defines no structure for their extension data – neither it nor RFC 5535 gives those three a layout, and the IANA registry records only their names. So the data is opaque by specification here rather than merely left undecoded, and no better parse is available to be written later. One handler serves all three, since they share a shape and differ only in their type code.- Parameters:
schema (
ExperimentalExtension) – 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.
- _make_ext_exp(type, option=None, *, data=b'', **kwargs)[source]¶
Make experimental CGA extension.
- Parameters:
type (
CGAExtension) – Extension type.option (
ExperimentalExtension|None) – Extension data model.data (
bytes) – Extension data, which RFC 4581 Section 3 gives no structure.**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¶
- class pcapkit.protocols.internet.mh.NTPTimestamp(seconds, fraction)[source]¶
Bases:
NTPTimestampNTP timestamp format, c.f., RFC 1305.
- class pcapkit.protocols.internet.mh.FastBindingAcknowledgmentStatus(*values)[source]¶
Bases:
IntEnum[FastBindingAcknowledgmentStatus] Fast Binding Acknowledgment Status Codes.
Status values of the fast binding acknowledgment (FBack) message, c.f., RFC 5568 Section 6.2.3. Values below
128indicate that the fast binding update was accepted by the receiving node, values of128and above that it was rejected.Note
RFC 5568 Section 6.2.3 defines these values inline and IANA keeps no registry of them, so the enumeration lives here rather than in
pcapkit.const.mh. It is also not interchangeable with the registeredStatusCode, since two of its values collide semantically:1means NCoA is invalid here but accepted but prefix discovery necessary there, and131means incorrect interface identifier length here but home registration not supported there.- Fast_Binding_Update_accepted = 0¶
Fast Binding Update accepted [RFC 5568 Section 6.2.3]
- Fast_Binding_Update_accepted_but_NCoA_is_invalid = 1¶
Fast Binding Update accepted but NCoA is invalid; use the NCoA supplied in the “alternate” care-of address option [RFC 5568 Section 6.2.3]
- Reason_unspecified = 128¶
Reason unspecified [RFC 5568 Section 6.2.3]
- Administratively_prohibited = 129¶
Administratively prohibited [RFC 5568 Section 6.2.3]
- Insufficient_resources = 130¶
Insufficient resources [RFC 5568 Section 6.2.3]
- Incorrect_interface_identifier_length = 131¶
Incorrect interface identifier length [RFC 5568 Section 6.2.3]
- class pcapkit.protocols.internet.mh.IPv6AddressPrefixCode(*values)[source]¶
Bases:
IntEnum[IPv6AddressPrefixCode] Mobility Header IPv6 Address/Prefix Option Codes.
Option codes of the mobility header IPv6 address/prefix option, which identify which address the option carries, c.f., RFC 5568 Section 6.4.2.
Note
RFC 5568 Section 6.4.2 defines these values inline and IANA keeps no registry of them, so the enumeration lives here rather than in
pcapkit.const.mh. The identical code space of the neighbor discovery IP address/prefix option of RFC 5568 Section 6.4.1 is likewise unregistered.- Old_Care_of_Address = 1¶
Old Care-of Address [RFC 5568 Section 6.4.2]
- New_Care_of_Address = 2¶
New Care-of Address [RFC 5568 Section 6.4.2]
- NAR_IP_address = 3¶
NAR’s IP address [RFC 5568 Section 6.4.2]
- NAR_Prefix = 4¶
NAR’s Prefix, sent in PrRtAdv; the prefix length field contains the number of valid leading bits in the prefix [RFC 5568 Section 6.4.2]
- class pcapkit.protocols.internet.mh.PMIPv6Timestamp(seconds, fraction)[source]¶
Bases:
PMIPv6TimestampProxy Mobile IPv6 timestamp format, c.f., RFC 5213 Section 8.8.
Note
This is not an RFC 1305 NTP timestamp, which is why it is a type of its own rather than a reuse of
NTPTimestamp. It counts from the UNIX epoch rather than NTP’s 1900 one, and splits its 64 bits 48/16 rather than 32/32, so each field means something different in the two.
- class pcapkit.protocols.internet.mh.LocalizedRoutingStatus(*values)[source]¶
Bases:
IntEnum[LocalizedRoutingStatus] Localized Routing Acknowledgment Status Codes.
Status values of the localized routing acknowledgment (LRA) message, c.f., RFC 6705 Section 10.2. Values below
128indicate that the initiation was processed successfully, values of128and above that it was rejected.Note
RFC 6705 Section 10.2 defines these values inline and IANA keeps no registry of them – neither a dedicated one nor entries in the general Status Codes registry – so the enumeration lives here rather than in
pcapkit.const.mh. It is not interchangeable with the registeredStatusCode, whose128and129mean something else entirely.- Success = 0¶
Success [RFC 6705 Section 10.2]
- Localized_Routing_Not_Allowed = 128¶
Localized Routing Not Allowed [RFC 6705 Section 10.2]
- MN_Not_Attached = 129¶
MN Not Attached [RFC 6705 Section 10.2]
- class pcapkit.protocols.internet.mh.LMAAddressCode(*values)[source]¶
Bases:
IntEnum[LMAAddressCode] Local Mobility Anchor Address Option Codes.
Option codes of the local mobility anchor address option, which say which address family the option carries, c.f., RFC 5949 Section 6.2.2.
Note
RFC 5949 Section 6.2.2 defines these values inline and IANA keeps no registry of them, so the enumeration lives here rather than in
pcapkit.const.mh.- Reserved = 0¶
Reserved [RFC 5949 Section 6.2.2]
- IPv6_LMAA = 1¶
IPv6 local mobility anchor address [RFC 5949 Section 6.2.2]
- IPv4_LMAA = 2¶
IPv4 local mobility anchor address [RFC 5949 Section 6.2.2]
Header Schemas¶
- class pcapkit.protocols.schema.internet.mh.MH(*args: _VT, **kwargs: _VT)[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(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for unassigned MH options.
- class pcapkit.protocols.schema.internet.mh.PadOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH padding options.
The two padding options do not share a wire shape: a
Pad1option is a lone type octet, whereas aPadNoption is a type octet, anOption Lengthoctet, and that many padding octets [RFC 6275 Section 6.2.5]. Both theOption Lengthoctet (Option.length) and the padding data (self.data) are therefore sized from the option type, so that aPad1option consumes exactly one octet.
- class pcapkit.protocols.schema.internet.mh.BindingRefreshAdviceOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH binding refresh advice options.
- interval: int = <UInt16Field interval>¶
Refresh interval. One time unit is 4 seconds [RFC 6275 Section 6.2.4].
- class pcapkit.protocols.schema.internet.mh.AlternateCareofAddressOption(*args: _VT, **kwargs: _VT)[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(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH nonce indices options.
- class pcapkit.protocols.schema.internet.mh.AuthorizationDataOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH binding authorization data options.
- class pcapkit.protocols.schema.internet.mh.MobileNetworkPrefixOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH mobile network prefix options.
- prefix: IPv6Address = <IPv6AddressField prefix>¶
Mobile network prefix.
- class pcapkit.protocols.schema.internet.mh.LinkLayerAddressOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH link-layer address (MH-LLA) options.
- class pcapkit.protocols.schema.internet.mh.MNIDOption(*args: _VT, **kwargs: _VT)[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(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for Mobility Message Authentication options.
- subtype: AuthSubtype = <EnumField subtype>¶
Subtype.
- class pcapkit.protocols.schema.internet.mh.MesgIDOption(*args: _VT, **kwargs: _VT)[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(*args: _VT, **kwargs: _VT)[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(*args: _VT, **kwargs: _VT)[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(*args: _VT, **kwargs: _VT)[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(*args: _VT, **kwargs: _VT)[source]¶
Bases:
CGAExtensionHeader schema for unknown CGA extensions.
- class pcapkit.protocols.schema.internet.mh.MultiPrefixExtension(*args: _VT, **kwargs: _VT)[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(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Signature options.
- class pcapkit.protocols.schema.internet.mh.PermanentHomeKeygenTokenOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for Permanent Home Keygen Token options.
- class pcapkit.protocols.schema.internet.mh.CareofTestInitOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Care-of Test Init options.
- class pcapkit.protocols.schema.internet.mh.CareofTestOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Care-of Test options.
- class pcapkit.protocols.schema.internet.mh.ExperimentalMobilityOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Experimental Mobility options.
- class pcapkit.protocols.schema.internet.mh.BADFOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Binding Authorization Data for FMIPv6 (BADF) options.
Note
Per RFC 5568 Section 6.4.5, the
lengthfield of this option counts thedata(authenticator) bytes only – it excludes the 4-bytespifield, unlike every other mobility option, whose length covers all option data. The option is therefore 6 bytes longer than its declared length, which is why RFC 5568 also requires it to be the last mobility option present.
- class pcapkit.protocols.schema.internet.mh.IPv6AddressPrefixOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Mobility Header IPv6 Address/Prefix options.
Note
The option codes of RFC 5568 Section 6.4.2 are defined inline by the RFC with no IANA registry behind them, so their enumeration lives in
pcapkit.protocols.internet.mh.IPv6AddressPrefixCoderather than inpcapkit.const.mh. Being module-local, it cannot be imported here without a circular import, socodecarries the raw wire integer and the enumeration is applied when_read_opt_ipv6_ap()builds the data model – the same split aspcapkit.protocols.misc.pcapng.PacketDirectionand theepb_flagsoption schema.- code: int = <UInt8Field code>¶
Option code, c.f.,
pcapkit.protocols.internet.mh.IPv6AddressPrefixCode.
- address: IPv6Address = <IPv6AddressField address>¶
IPv6 address/prefix.
- class pcapkit.protocols.schema.internet.mh.UnknownMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH unknown message type.
- class pcapkit.protocols.schema.internet.mh.BindingRefreshRequestMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Binding Refresh Request (BRR) message.
- class pcapkit.protocols.schema.internet.mh.HomeTestInitMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Home Test Init (HoTI) message.
- class pcapkit.protocols.schema.internet.mh.CareofTestInitMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Care-of Test Init (CoTI) messages.
- class pcapkit.protocols.schema.internet.mh.HomeTestMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Home Test (HoT) message.
- class pcapkit.protocols.schema.internet.mh.CareofTestMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Care-of Test (CoT) message.
- class pcapkit.protocols.schema.internet.mh.BindingUpdateMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Binding Update (BU) messages.
- flags: BindingUpdateMessageFlags = <BitField flags>¶
Flags.
- class pcapkit.protocols.schema.internet.mh.BindingAcknowledgementMessage(*args: _VT, **kwargs: _VT)[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(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Binding Error (BE) messages.
- status: BindingError = <EnumField status>¶
Status.
- home: IPv6Address = <IPv6AddressField home>¶
Home address.
- class pcapkit.protocols.schema.internet.mh.FastBindingUpdateMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Fast Binding Update (FBU) messages.
- flags: FastBindingUpdateMessageFlags = <BitField flags>¶
Flags.
- lifetime: int = <UInt16Field lifetime>¶
Lifetime, in seconds [RFC 5568 Section 6.2.2].
- class pcapkit.protocols.schema.internet.mh.FastBindingAcknowledgmentMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Fast Binding Acknowledgment (FBack) messages.
Note
The status values of RFC 5568 Section 6.2.3 are defined inline by the RFC and are absent from the IANA Status Codes registry, so their enumeration lives in
pcapkit.protocols.internet.mh.FastBindingAcknowledgmentStatusrather than inpcapkit.const.mh. Being module-local, it cannot be imported here without a circular import, sostatuscarries the raw wire integer and the enumeration is applied when_read_msg_fback()builds the data model.- status: int = <UInt8Field status>¶
Status, c.f.,
pcapkit.protocols.internet.mh.FastBindingAcknowledgmentStatus.
- flags: FastBindingAcknowledgmentMessageFlags = <BitField flags>¶
Flags.
- lifetime: int = <UInt16Field lifetime>¶
Lifetime, in seconds [RFC 5568 Section 6.2.3].
- class pcapkit.protocols.schema.internet.mh.FastNeighborAdvertisementMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Fast Neighbor Advertisement (FNA) messages.
- class pcapkit.protocols.schema.internet.mh.ExperimentalMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Experimental Mobility Header messages.
- class pcapkit.protocols.schema.internet.mh.HandoverInitiateMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Handover Initiate (HI) messages.
- flags: HandoverInitiateMessageFlags = <BitField flags>¶
Flags.
- code: HandoverInitiateStatus = <EnumField code>¶
Code.
- class pcapkit.protocols.schema.internet.mh.HandoverAcknowledgeMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Handover Acknowledge (HAck) messages.
- flags: HandoverAcknowledgeMessageFlags = <BitField flags>¶
Flags.
- code: HandoverACKStatus = <EnumField code>¶
Code.
- class pcapkit.protocols.schema.internet.mh.HeartbeatMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Heartbeat messages.
- flags: HeartbeatMessageFlags = <BitField flags>¶
Flags.
- class pcapkit.protocols.schema.internet.mh.HomeAgentSwitchMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Home Agent Switch messages.
- addresses: list[IPv6Address] = <ListField addresses>¶
Home agent addresses.
- class pcapkit.protocols.schema.internet.mh.BindingRevocationMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Binding Revocation messages.
The one message type carries two forms, told apart by
br_typerather than by the Mobility Header type: a Binding Revocation Indication [RFC 5846 Section 5.1] and a Binding Revocation Acknowledgement [RFC 5846 Section 5.2]. Both have the same geometry, and the only field that differs is the octet afterbr_type– a revocation trigger in the former and a status code in the latter – socodeselects its enumeration frombr_type.- br_type: BindingRevocation = <EnumField br_type>¶
Binding revocation type, saying which form this is.
- code: RevocationTrigger | RevocationStatusCode = <SwitchField code>¶
Revocation trigger, or acknowledgement status.
- flags: BindingRevocationMessageFlags = <BitField flags>¶
Flags.
- class pcapkit.protocols.schema.internet.mh.LocalizedRoutingInitiationMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Localized Routing Initiation messages.
- lifetime: int = <UInt16Field lifetime>¶
Lifetime, in seconds rather than in the units of 4 seconds that the binding messages use.
0xFFFFis an infinite lifetime and0asks for localized routing to stop [RFC 6705 Section 10.1].
- class pcapkit.protocols.schema.internet.mh.LocalizedRoutingAcknowledgmentMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Localized Routing Acknowledgment messages.
Note
RFC 6705 Section 10.2 defines this message’s three status values inline and IANA keeps no registry for them – they are neither in the general Status Codes registry nor in one of their own – so their enumeration lives in
pcapkit.protocols.internet.mh.LocalizedRoutingStatusrather than inpcapkit.const.mh. Being module-local, it cannot be imported here without a circular import, sostatuscarries the raw wire integer.- flags: LocalizedRoutingAcknowledgmentMessageFlags = <BitField flags>¶
Flags.
- status: int = <UInt8Field status>¶
Status, c.f.,
pcapkit.protocols.internet.mh.LocalizedRoutingStatus.
- class pcapkit.protocols.schema.internet.mh.UpdateNotificationMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Update Notification messages.
- reason: UpdateNotificationReason = <EnumField reason>¶
Notification reason.
- flags: UpdateNotificationMessageFlags = <BitField flags>¶
Flags.
- class pcapkit.protocols.schema.internet.mh.UpdateNotificationAcknowledgementMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Update Notification Acknowledgement messages.
- status: UpdateNotificationACKStatus = <EnumField status>¶
Status.
- class pcapkit.protocols.schema.internet.mh.FlowBindingMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Flow Binding messages.
As with
BindingRevocationMessage, the one message type carries two forms told apart by a field inside the message rather than by the Mobility Header type: a Flow Binding Indication [RFC 7109 Section 6.1.1] and a Flow Binding Acknowledgement [RFC 7109 Section 6.1.2], selected byfb_type.Note
The octet after
codeholds theAflag in an indication and is wholly reserved in an acknowledgement, soflagsreads as all-zero for a well-formed acknowledgement.- fb_type: FlowBindingType = <EnumField fb_type>¶
Flow binding type, saying which form this is.
- code: FlowBindingIndicationTrigger | FlowBindingACKStatus = <SwitchField code>¶
Indication trigger, or acknowledgement status.
- flags: FlowBindingMessageFlags = <BitField flags>¶
Flags.
- class pcapkit.protocols.schema.internet.mh.SubscriptionQueryMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Subscription Query messages.
Note
The sequence number is a single octet here, unlike the two-octet one of most other mobility messages [RFC 7161 Section 4.3.1.2].
- class pcapkit.protocols.schema.internet.mh.SubscriptionResponseMessage(*args: _VT, **kwargs: _VT)[source]¶
Bases:
PacketHeader schema for MH Subscription Response messages.
- flags: SubscriptionResponseMessageFlags = <BitField flags>¶
Flags.
- class pcapkit.protocols.schema.internet.mh.HomeNetworkPrefixOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Home Network Prefix options.
- prefix: IPv6Address = <IPv6AddressField prefix>¶
Home network prefix.
- class pcapkit.protocols.schema.internet.mh.HandoffIndicatorOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Handoff Indicator options.
- hi: HandoffType = <EnumField hi>¶
Handoff indicator.
- class pcapkit.protocols.schema.internet.mh.AccessTechnologyTypeOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Access Technology Type options.
- att: AccessType = <EnumField att>¶
Access technology type.
- class pcapkit.protocols.schema.internet.mh.MNLLIdentifierOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Mobile Node Link-layer Identifier options.
- class pcapkit.protocols.schema.internet.mh.LinkLocalAddressOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Link-local Address options.
- address: IPv6Address = <IPv6AddressField address>¶
Link-local address.
- class pcapkit.protocols.schema.internet.mh.TimestampOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Timestamp options.
Note
The 64-bit timestamp of RFC 5213 Section 8.8 is not an RFC 1305 NTP timestamp, which is why it is not shared with
MesgIDOption. It counts seconds since 1 January 1970 00:00 UTC – the UNIX epoch, not NTP’s 1900 one – in a fixed-point format whose integer part occupies the leading 48 bits and whose fractional part occupies the trailing 16, each unit of the latter being 1/65536 of a second. NTP splits its 64 bits 32/32 from a different epoch, so reusingNTPTimestamphere would misread both halves.- timestamp: FixedPointTimestamp = <BitField timestamp>¶
Timestamp, as the 48-bit second count and 16-bit fraction of RFC 5213 Section 8.8.
- class pcapkit.protocols.schema.internet.mh.RestartCounterOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Restart Counter options.
- class pcapkit.protocols.schema.internet.mh.DNSUpdateOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH DNS-UPDATE-TYPE options.
- status: DNSStatusCode = <EnumField status>¶
Status.
- flags: DNSUpdateOptionFlags = <BitField flags>¶
Flags.
- class pcapkit.protocols.schema.internet.mh.VendorSpecificOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Vendor Specific mobility options.
- class pcapkit.protocols.schema.internet.mh.ServiceSelectionOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Service Selection mobility options.
- class pcapkit.protocols.schema.internet.mh.IPv4HomeAddressOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH IPv4 Home Address options.
- flags: IPv4HomeAddressOptionFlags = <BitField flags>¶
Prefix length and flags. RFC 5555 Section 3.1.1 packs the 6-bit
Prefix-len, thePflag and 9 reserved bits into one 16-bit word.
- address: IPv4Address = <IPv4AddressField address>¶
IPv4 home address.
- class pcapkit.protocols.schema.internet.mh.IPv4AddressAcknowledgementOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH IPv4 Address Acknowledgement options.
- status: DSMIPv6HomeAddress = <EnumField status>¶
Status.
- flags: PrefixLengthOnly = <BitField flags>¶
Prefix length, with 2 reserved bits below it.
- address: IPv4Address = <IPv4AddressField address>¶
IPv4 home address.
- class pcapkit.protocols.schema.internet.mh.NATDetectionOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH NAT Detection options.
- flags: NATDetectionOptionFlags = <BitField flags>¶
Flags.
- class pcapkit.protocols.schema.internet.mh.IPv4CareofAddressOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH IPv4 Care-of Address options.
- address: IPv4Address = <IPv4AddressField address>¶
IPv4 care-of address.
- class pcapkit.protocols.schema.internet.mh.GREKeyOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH GRE Key options.
Note
The
GRE Key Identifierfield is absent whenOption.lengthis2and present when it is6[RFC 5845 Section 6.1]. There is no flag saying so, sokeyis sized from the option length alone.
- class pcapkit.protocols.schema.internet.mh.BindingIdentifierOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Binding Identifier (BID) options.
Note
The care-of address is absent when
Option.lengthis4, an IPv4 address when it is8, and an IPv6 address when it is20[RFC 5648 Section 4.3]. The option carries no address-family flag, soaddressis selected from the option length alone.RFC 6089 Section 4.1 renames the 7 bits below the
Hflag fromReservedtoBID-PRI, a binding priority in which0means the sender predates RFC 6089. The field is parsed under the newer name.- status: StatusCode = <EnumField status>¶
Status, overriding the message status for this binding alone.
- flags: BindingIdentifierOptionFlags = <BitField flags>¶
Simultaneous home and foreign binding flag, and binding priority.
- address: IPv4Address | IPv6Address | bytes | None = <ConditionalField address>¶
Care-of address, absent for an option length of 4.
- class pcapkit.protocols.schema.internet.mh.IPv4HomeAddressRequestOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH IPv4 Home Address Request options.
- flags: PrefixLengthOnly = <BitField flags>¶
Prefix length, with 10 reserved bits below it.
- address: IPv4Address = <IPv4AddressField address>¶
Requested IPv4 home address.
- class pcapkit.protocols.schema.internet.mh.IPv4HomeAddressReplyOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH IPv4 Home Address Reply options.
- status: HomeAddressReply = <EnumField status>¶
Status.
- flags: PrefixLengthOnly = <BitField flags>¶
Prefix length, with 2 reserved bits below it.
- address: IPv4Address = <IPv4AddressField address>¶
Assigned IPv4 home address.
- class pcapkit.protocols.schema.internet.mh.IPv4DefaultRouterAddressOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH IPv4 Default-Router Address options.
- address: IPv4Address = <IPv4AddressField address>¶
IPv4 default-router address.
- class pcapkit.protocols.schema.internet.mh.IPv4DHCPSupportModeOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH IPv4 DHCP Support Mode options.
- flags: IPv4DHCPSupportModeOptionFlags = <BitField flags>¶
Flags. The
Sbit is the last bit of the option, not the first [RFC 5844 Section 3.3.4].
- class pcapkit.protocols.schema.internet.mh.ContextRequestOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Context Request options.
Note
The request entries are carried as one opaque run here and walked by
_read_opt_cr(), rather than as aListFieldof a nested schema. Each entry is self-describing – a type octet, a length octet and that many octets of value [RFC 5949 Section 6.2.1] – so a nested schema would need aSchemaFieldwith no fixed length, and such a field is handed-1as its length and hands that on as the nested schema’s__length__. Every field then decrements a budget that started negative, and parsing a perfectly valid option emits aSchemaWarningper field sayingpacket length < 0. Decoding the run directly costs a few lines and keeps a valid packet quiet.
- class pcapkit.protocols.schema.internet.mh.LMAAddressOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Local Mobility Anchor Address options.
Note
codesays whether an IPv6 (1) or an IPv4 (2) address follows [RFC 5949 Section 6.2.2]. Those codes are defined inline by the RFC with no IANA registry behind them, so their enumeration lives inpcapkit.protocols.internet.mh.LMAAddressCoderather than inpcapkit.const.mh, andcodecarries the raw wire integer. The address field is nonetheless sized fromOption.length, which is the authoritative width on the wire.- code: int = <UInt8Field code>¶
Option code, c.f.,
pcapkit.protocols.internet.mh.LMAAddressCode.
- address: IPv4Address | IPv6Address | bytes = <SwitchField address>¶
Local mobility anchor address.
- class pcapkit.protocols.schema.internet.mh.MNLLAIIDOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Mobile Node Link-local Address Interface Identifier options.
- class pcapkit.protocols.schema.internet.mh.TransientBindingOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Transient Binding options.
- flags: TransientBindingOptionFlags = <BitField flags>¶
Flags.
- class pcapkit.protocols.schema.internet.mh.FlowSummaryOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Flow Summary mobility options.
- class pcapkit.protocols.schema.internet.mh.FlowIdentificationOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Flow Identification mobility options.
- status: FlowIDStatus = <EnumField status>¶
Status.
- suboptions: list[FlowIdentificationSuboption] = <OptionField suboptions>¶
Sub-options.
- class pcapkit.protocols.schema.internet.mh.RedirectCapabilityOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Redirect-Capability mobility options.
- class pcapkit.protocols.schema.internet.mh.RedirectOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Redirect mobility options.
Note
Exactly one of the
KandNflags is set – RFC 6463 Section 4.2 forbids both being set and both being clear – so exactly one ofipv6andipv4is present, and the option length is correspondingly 18 or 6.- flags: RedirectOptionFlags = <BitField flags>¶
Flags.
- ipv6: IPv6Address | None = <ConditionalField ipv6>¶
IPv6 address of the redirected-to LMA, present when
Kis set.
- ipv4: IPv4Address | None = <ConditionalField ipv4>¶
IPv4 address of the redirected-to LMA, present when
Nis set.
- class pcapkit.protocols.schema.internet.mh.LoadInformationOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Load Information mobility options.
- class pcapkit.protocols.schema.internet.mh.AlternateIPv4CareofAddressOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Alternate IPv4 Care-of Address options.
- address: IPv4Address = <IPv4AddressField address>¶
Alternate IPv4 care-of address.
- class pcapkit.protocols.schema.internet.mh.MNGroupIdentifierOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Mobile Node Group Identifier options.
- class pcapkit.protocols.schema.internet.mh.MAGIPv6AddressOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH MAG IPv6 Address options.
- address: IPv6Address = <IPv6AddressField address>¶
MAG IPv6 address.
- class pcapkit.protocols.schema.internet.mh.AccessNetworkIdentifierOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Access Network Identifier options.
Note
Unlike most options that carry sub-options, this one has no reserved octet between its own length and the first sub-option [RFC 6757 Section 3].
- suboptions: list[ANISuboption] = <OptionField suboptions>¶
Sub-options.
- class pcapkit.protocols.schema.internet.mh.IPv4TrafficOffloadSelectorOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH IPv4 Traffic Offload Selector options.
- flags: ModeFlagOnly = <BitField flags>¶
Flags.
- selector: list[FlowIdentificationSuboption] = <OptionField selector>¶
Traffic selector, carried as the traffic selector sub-option of RFC 6089 Section 4.2.1.4. Optional in a proxy binding update and mandatory in a proxy binding acknowledgement, hence a list.
- class pcapkit.protocols.schema.internet.mh.DynamicIPMulticastSelectorOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Dynamic IP Multicast Selector options.
Note
The multicast address records are RFC 3810 Section 5.2 MLD or RFC 3376 Section 4.2 IGMP structures, which belong to those protocols rather than to the Mobility Header, so they are carried opaquely here.
protocolsays which of the two they are in –143for MLDv2 and131for MLDv1.- flags: ModeFlagOnly = <BitField flags>¶
Flags.
- class pcapkit.protocols.schema.internet.mh.DelegatedMNPOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Delegated Mobile Network Prefix options.
- flags: DelegatedMNPOptionFlags = <BitField flags>¶
Flags.
- prefix: IPv4Address | IPv6Address = <SwitchField prefix>¶
Delegated mobile network prefix, an IPv4 one when
Vis set.
- class pcapkit.protocols.schema.internet.mh.ActiveMulticastSubscriptionIPv4Option(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Active Multicast Subscription IPv4 options.
Note
The membership context is an IGMP group address or group record [RFC 1112, RFC 2236, RFC 3376 Section 4.2], which belongs to IGMP rather than to the Mobility Header, so it is carried opaquely here.
- class pcapkit.protocols.schema.internet.mh.ActiveMulticastSubscriptionIPv6Option(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Active Multicast Subscription IPv6 options.
Note
The membership context is an RFC 3810 Section 5.2 multicast address record for MLDv2, or a reserved word followed by a multicast address for MLDv1 [RFC 2710]. Both belong to MLD rather than to the Mobility Header, so the context is carried opaquely here.
- class pcapkit.protocols.schema.internet.mh.QualityOfServiceOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Quality-of-Service options.
- attributes: list[QoSAttribute] = <OptionField attributes>¶
Quality-of-service attributes.
- class pcapkit.protocols.schema.internet.mh.LMAUserPlaneAddressOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH LMA User-Plane Address options.
- address: IPv4Address | IPv6Address | bytes = <SwitchField address>¶
LMA user-plane address, absent in a proxy binding update.
- class pcapkit.protocols.schema.internet.mh.MulticastMobilityOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Multicast Mobility options.
Note
This option’s length field is not the usual octet count. RFC 7411 Section 5.3 measures it in 32-bit words and excludes the option code and reserved octets as well as the type and length ones, so the whole option occupies
4 + length * 4octets. The report payload itself is an MLD or IGMP structure belonging to those protocols, so it is carried opaquely.
- class pcapkit.protocols.schema.internet.mh.MulticastAcknowledgementOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Multicast Acknowledgement options.
Note
As with
MulticastMobilityOption, the length field counts 32-bit words rather than octets and excludes the option code and status octets [RFC 7411 Section 5.4].
- class pcapkit.protocols.schema.internet.mh.LMAControlledMAGParametersOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH LMA-Controlled MAG Parameters options.
Note
The option is registered to RFC 8127, not to RFC 7864 – the latter defines the flow-mobility options and the
FLOW-MOBILITYupdate notification reason instead.- suboptions: list[LMAControlledMAGSuboption] = <OptionField suboptions>¶
Sub-options.
- class pcapkit.protocols.schema.internet.mh.MAGMultipathBindingOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH MAG Multipath Binding options.
- att: AccessType = <EnumField att>¶
Interface access-technology type.
- flags: MAGMultipathBindingOptionFlags = <BitField flags>¶
Flags.
- class pcapkit.protocols.schema.internet.mh.MAGIdentifierOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH MAG Identifier options.
- subtype: MNIDSubtype = <EnumField subtype>¶
Sub-type, drawn from the mobile node identifier subtype registry.
- class pcapkit.protocols.schema.internet.mh.AnchoredPrefixOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Anchored Prefix options [RFC 8885 Section 4.3].
- prefix: IPv6Address = <IPv6AddressField prefix>¶
Anchored prefix.
- class pcapkit.protocols.schema.internet.mh.LocalPrefixOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Local Prefix options [RFC 8885 Section 4.4].
- prefix: IPv6Address = <IPv6AddressField prefix>¶
Local prefix.
- class pcapkit.protocols.schema.internet.mh.PreviousMAAROption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Previous MAAR options [RFC 8885 Section 4.5].
- maar: IPv6Address = <IPv6AddressField maar>¶
Previous MAAR’s global address.
- prefix: IPv6Address = <IPv6AddressField prefix>¶
Mobile node’s home network prefix.
- class pcapkit.protocols.schema.internet.mh.ServingMAAROption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH Serving MAAR options [RFC 8885 Section 4.6].
- address: IPv6Address = <IPv6AddressField address>¶
Serving MAAR’s global address.
- class pcapkit.protocols.schema.internet.mh.DLIFLinkLocalAddressOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH DLIF Link-Local Address options [RFC 8885 Section 4.7].
- address: IPv6Address = <IPv6AddressField address>¶
Distributed logical interface’s link-local address.
- class pcapkit.protocols.schema.internet.mh.DLIFLinkLayerAddressOption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
OptionHeader schema for MH DLIF Link-Layer Address options [RFC 8885 Section 4.8].
- lla: bytes = <BytesField lla>¶
Distributed logical interface’s link-layer address, encoded as in RFC 4861 Section 4.6.2 and therefore link-type dependent in width.
- class pcapkit.protocols.schema.internet.mh.FlowIdentificationSuboption(dict_=None, **kwargs)[source]¶
Bases:
EnumSchema[FlowIDSuboption]Header schema for MH Flow Identification sub-options.
- type: FlowIDSuboption = <EnumField type>¶
Sub-option type.
- class pcapkit.protocols.schema.internet.mh.UnassignedFlowIdentificationSuboption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
FlowIdentificationSuboptionHeader schema for unassigned MH Flow Identification sub-options.
- class pcapkit.protocols.schema.internet.mh.PadFlowIdentificationSuboption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
FlowIdentificationSuboptionHeader schema for MH Flow Identification padding sub-options.
As with the mobility options themselves, the one-octet
Padsub-option carries neither a length field nor any data, whereasPadNcarries both [RFC 6089 Section 4.2.1.1, RFC 6089 Section 4.2.1.2].
- class pcapkit.protocols.schema.internet.mh.BIDReferenceSuboption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
FlowIdentificationSuboptionHeader schema for MH Flow Identification BID Reference sub-options.
- class pcapkit.protocols.schema.internet.mh.TrafficSelectorSuboption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
FlowIdentificationSuboptionHeader schema for MH Flow Identification Traffic Selector sub-options.
Note
The interior of
selectoris defined by RFC 6088 – a flag word followed by whichever of its sixteen range bounds the flags select – and belongs to the separate Traffic Selector Format registry rather than to this sub-option. It is therefore carried opaquely here, andts_formatsays which format it is in.- ts_format: TrafficSelector = <EnumField ts_format>¶
Traffic selector format.
- class pcapkit.protocols.schema.internet.mh.FlowBindingActionSuboption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
FlowIdentificationSuboptionHeader schema for MH Flow Identification Flow Binding Action sub-options.
- action: FlowBindingAction = <EnumField action>¶
Flow binding action.
- class pcapkit.protocols.schema.internet.mh.TargetCareofAddressSuboption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
FlowIdentificationSuboptionHeader schema for MH Flow Identification Target Care-of Address sub-options.
Note
As with the Binding Identifier option, the sub-option carries no address-family flag, so the address is an IPv4 one when the sub-option length is 6 and an IPv6 one when it is 18 [RFC 7109 Section 6.2.2].
- address: IPv4Address | IPv6Address | bytes = <SwitchField address>¶
Target care-of address.
- class pcapkit.protocols.schema.internet.mh.ANISuboption(dict_=None, **kwargs)[source]¶
Bases:
EnumSchema[ANISuboption]Header schema for MH Access Network Identifier sub-options.
- type: ANISuboption = <EnumField type>¶
Sub-option type.
- class pcapkit.protocols.schema.internet.mh.UnassignedANISuboption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
ANISuboptionHeader schema for unassigned MH Access Network Identifier sub-options.
- class pcapkit.protocols.schema.internet.mh.ANINetworkIdentifierSuboption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
ANISuboptionHeader schema for MH Network-Identifier ANI sub-options.
- flags: ANINetworkIdentifierFlags = <BitField flags>¶
Flags.
- class pcapkit.protocols.schema.internet.mh.ANIGeoLocationSuboption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
ANISuboptionHeader schema for MH Geo-Location ANI sub-options.
Note
Both degree fields are 24-bit two’s-complement fixed-point values with 9 integer bits [RFC 6757 Section 3.1.2]. A
BitFieldreads them unsigned, so the sign is applied when_read_ani_suboptions()builds the data model.- location: GeoLocationDegrees = <BitField location>¶
Latitude and longitude, in the fixed-point format of RFC 6757 Section 3.1.2.
- class pcapkit.protocols.schema.internet.mh.ANIOperatorIdentifierSuboption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
ANISuboptionHeader schema for MH Operator-Identifier ANI sub-options.
- op_id_type: OperatorID = <EnumField op_id_type>¶
Operator identifier type.
- class pcapkit.protocols.schema.internet.mh.ANICivicLocationSuboption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
ANISuboptionHeader schema for MH Civic-Location ANI sub-options [RFC 7563 Section 3.1].
- format: int = <UInt8Field format>¶
Encoding format; only
0, the binary encoding of RFC 4776 Section 3.1, is defined.
- class pcapkit.protocols.schema.internet.mh.ANIMAGGroupIdentifierSuboption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
ANISuboptionHeader schema for MH MAG-Group-Identifier ANI sub-options.
Note
RFC 7563 Section 3.2 contradicts itself about this field’s width: the diagram places
group identifierin bits 16 to 31 of the word, and the prose fixesANI Lengthat2, but the field description then calls it “a 3-octet unsigned integer value”. Two of the three statements agree on two octets and are the ones that constrain the wire, so that is what is parsed here. No erratum has been filed against the RFC.
- class pcapkit.protocols.schema.internet.mh.ANIUpdateTimerSuboption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
ANISuboptionHeader schema for MH ANI Update-Timer sub-options [RFC 7563 Section 3.3].
- class pcapkit.protocols.schema.internet.mh.QoSAttribute(dict_=None, **kwargs)[source]¶
Bases:
EnumSchema[QoSAttribute]Header schema for MH Quality-of-Service attributes.
- type: QoSAttribute = <EnumField type>¶
Attribute type.
- class pcapkit.protocols.schema.internet.mh.UnassignedQoSAttribute(*args: _VT, **kwargs: _VT)[source]¶
Bases:
QoSAttributeHeader schema for unassigned MH Quality-of-Service attributes.
- class pcapkit.protocols.schema.internet.mh.BitRateAttribute(*args: _VT, **kwargs: _VT)[source]¶
Bases:
QoSAttributeHeader schema for the MH Quality-of-Service attributes that carry a bare bit rate.
Six of the eleven registered attributes share this shape – two reserved octets and a 32-bit rate [RFC 7222 Section 4.2.1, RFC 7222 Section 4.2.2, RFC 7222 Section 4.2.6 to RFC 7222 Section 4.2.9] – so one schema is registered against all six.
Note
The rate is in bits per second, not kilobits [RFC 7222 Section 4.2.1].
- class pcapkit.protocols.schema.internet.mh.PerSessionBitRateAttribute(*args: _VT, **kwargs: _VT)[source]¶
Bases:
QoSAttributeHeader schema for the MH per-session aggregate maximum bit-rate Quality-of-Service attributes [RFC 7222 Section 4.2.3, RFC 7222 Section 4.2.4].
- flags: SessionBitRateFlags = <BitField flags>¶
Flags.
- class pcapkit.protocols.schema.internet.mh.AllocationRetentionPriorityAttribute(*args: _VT, **kwargs: _VT)[source]¶
Bases:
QoSAttributeHeader schema for the MH Allocation-Retention-Priority Quality-of-Service attribute [RFC 7222 Section 4.2.5].
- priority: AllocationRetentionPriorityFields = <BitField priority>¶
Priority level, pre-emption capability and pre-emption vulnerability.
- class pcapkit.protocols.schema.internet.mh.QoSTrafficSelectorAttribute(*args: _VT, **kwargs: _VT)[source]¶
Bases:
QoSAttributeHeader schema for the MH QoS-Traffic-Selector Quality-of-Service attribute.
Note
The reserved octet comes before the traffic selector format here, which is the other way round from the traffic selector sub-option of RFC 6089 Section 4.2.1.4 [RFC 7222 Section 4.2.10]. The two are otherwise the same shape, which makes them easy to confuse.
- ts_format: TrafficSelector = <EnumField ts_format>¶
Traffic selector format.
- class pcapkit.protocols.schema.internet.mh.QoSVendorSpecificAttribute(*args: _VT, **kwargs: _VT)[source]¶
Bases:
QoSAttributeHeader schema for the MH QoS-Vendor-Specific Quality-of-Service attribute [RFC 7222 Section 4.2.11].
- class pcapkit.protocols.schema.internet.mh.LMAControlledMAGSuboption(dict_=None, **kwargs)[source]¶
Bases:
EnumSchema[LMAControlledMAGSuboption]Header schema for MH LMA-Controlled MAG Parameters sub-options.
- type: LMAControlledMAGSuboption = <EnumField type>¶
Sub-option type.
- class pcapkit.protocols.schema.internet.mh.UnassignedLMAControlledMAGSuboption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
LMAControlledMAGSuboptionHeader schema for unassigned MH LMA-Controlled MAG Parameters sub-options.
- class pcapkit.protocols.schema.internet.mh.BindingReregistrationControlSuboption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
LMAControlledMAGSuboptionHeader schema for MH Binding Re-registration Control sub-options [RFC 8127 Section 3.1.1].
- start_time: int = <UInt16Field start_time>¶
Time before binding expiry at which to re-register. One time unit is 4 seconds.
- class pcapkit.protocols.schema.internet.mh.HeartbeatControlSuboption(*args: _VT, **kwargs: _VT)[source]¶
Bases:
LMAControlledMAGSuboptionHeader schema for MH Heartbeat Control sub-options [RFC 8127 Section 3.1.2].
- class pcapkit.protocols.schema.internet.mh.ExperimentalExtension(*args: _VT, **kwargs: _VT)[source]¶
Bases:
CGAExtensionHeader schema for experimental CGA extensions.
RFC 4581 Section 3 assigns extension types
0xFFFD,0xFFFEand0xFFFFfor experimental use as RFC 3692 recommends, and defines no structure for their extension data – neither it nor RFC 5535 gives those three a layout, and the IANA registry records only their names. So the data is genuinely opaque rather than merely undecoded here, and a parser cannot do better than the extension header and a byte string.The three share one schema because they share one shape; they are told apart by
CGAExtension.type.
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.
- class pcapkit.protocols.schema.internet.mh.FastBindingUpdateMessageFlags[source]¶
Bases:
TypedDictFlags for
FastBindingUpdateMessage.flags.
- class pcapkit.protocols.schema.internet.mh.FastBindingAcknowledgmentMessageFlags[source]¶
Bases:
TypedDictFlags for
FastBindingAcknowledgmentMessage.flags.
- class pcapkit.protocols.schema.internet.mh.HandoverInitiateMessageFlags[source]¶
Bases:
TypedDictFlags for
HandoverInitiateMessage.flags.
- class pcapkit.protocols.schema.internet.mh.HandoverAcknowledgeMessageFlags[source]¶
Bases:
TypedDictFlags for
HandoverAcknowledgeMessage.flags.
- class pcapkit.protocols.schema.internet.mh.HeartbeatMessageFlags[source]¶
Bases:
TypedDictFlags for
HeartbeatMessage.flags.
- class pcapkit.protocols.schema.internet.mh.FixedPointTimestamp[source]¶
Bases:
TypedDictFixed-point timestamp of
TimestampOption.timestamp.
- class pcapkit.protocols.schema.internet.mh.BindingRevocationMessageFlags[source]¶
Bases:
TypedDictFlags for
BindingRevocationMessage.flags.
- class pcapkit.protocols.schema.internet.mh.LocalizedRoutingAcknowledgmentMessageFlags[source]¶
Bases:
TypedDictFlags for
LocalizedRoutingAcknowledgmentMessage.flags.
- class pcapkit.protocols.schema.internet.mh.FlowBindingMessageFlags[source]¶
Bases:
TypedDictFlags for
FlowBindingMessage.flags.
- class pcapkit.protocols.schema.internet.mh.UpdateNotificationMessageFlags[source]¶
Bases:
TypedDictFlags for
UpdateNotificationMessage.flags.
- class pcapkit.protocols.schema.internet.mh.SubscriptionResponseMessageFlags[source]¶
Bases:
TypedDictFlags for
SubscriptionResponseMessage.flags.
- class pcapkit.protocols.schema.internet.mh.DNSUpdateOptionFlags[source]¶
Bases:
TypedDictFlags for
DNSUpdateOption.flags.
- class pcapkit.protocols.schema.internet.mh.IPv4HomeAddressOptionFlags[source]¶
Bases:
TypedDictPrefix length and flags of
IPv4HomeAddressOption.flags.
- class pcapkit.protocols.schema.internet.mh.PrefixLengthOnly[source]¶
Bases:
TypedDictPrefix length packed alone in its own word, as in
IPv4AddressAcknowledgementOption.flags,IPv4HomeAddressRequestOption.flagsandIPv4HomeAddressReplyOption.flags.
- class pcapkit.protocols.schema.internet.mh.NATDetectionOptionFlags[source]¶
Bases:
TypedDictFlags for
NATDetectionOption.flags.
- class pcapkit.protocols.schema.internet.mh.IPv4DHCPSupportModeOptionFlags[source]¶
Bases:
TypedDictFlags for
IPv4DHCPSupportModeOption.flags.
- class pcapkit.protocols.schema.internet.mh.RedirectOptionFlags[source]¶
Bases:
TypedDictFlags for
RedirectOption.flags.
- class pcapkit.protocols.schema.internet.mh.BindingIdentifierOptionFlags[source]¶
Bases:
TypedDictFlag and priority of
BindingIdentifierOption.flags.
- class pcapkit.protocols.schema.internet.mh.TransientBindingOptionFlags[source]¶
Bases:
TypedDictFlags for
TransientBindingOption.flags.
- class pcapkit.protocols.schema.internet.mh.ModeFlagOnly[source]¶
Bases:
TypedDictA lone
Mmode flag, as inDynamicIPMulticastSelectorOption.flagsandIPv4TrafficOffloadSelectorOption.flags.
- class pcapkit.protocols.schema.internet.mh.DelegatedMNPOptionFlags[source]¶
Bases:
TypedDictFlags for
DelegatedMNPOption.flags.
- class pcapkit.protocols.schema.internet.mh.MAGMultipathBindingOptionFlags[source]¶
Bases:
TypedDictFlags for
MAGMultipathBindingOption.flags.
- class pcapkit.protocols.schema.internet.mh.ANINetworkIdentifierFlags[source]¶
Bases:
TypedDictFlags for
ANINetworkIdentifierSuboption.flags.
- class pcapkit.protocols.schema.internet.mh.GeoLocationDegrees[source]¶
Bases:
TypedDictLatitude and longitude of
ANIGeoLocationSuboption.location.
- class pcapkit.protocols.schema.internet.mh.SessionBitRateFlags[source]¶
Bases:
TypedDictFlags for
PerSessionBitRateAttribute.flags.
Auxiliary Functions¶
- pcapkit.protocols.schema.internet.mh.mh_data_selector(pkt)[source]¶
Selector function for
MH.datafield.
- pcapkit.protocols.schema.internet.mh.mn_id_selector(pkt)[source]¶
Selector function for
MNIDOption.identifierfield.
- pcapkit.protocols.schema.internet.mh.pad_opt_data_len(pkt)[source]¶
Return the length of the padding data of a padding option.
- Parameters:
- Return type:
- Returns:
Number of padding octets carried after the option header, i.e. the value of the
Option Lengthfield of aPadNoption, and zero for aPad1option, which carries no such field.
Note
A
Pad1option is a single octet with neither anOption Lengthfield nor any option data (c.f. RFC 6275 Section 6.2.5), which is whyOption.lengthis declared as aConditionalFieldand is skipped for it. A skipped conditional field is recorded in the packet data asNoValue, rather than being left out of it, so the test below has to be on the value and not on the presence of the key:pkt.get('length', 0)on its own hands thatNoValueTypestraight toPaddingField, where it becomes an unusablestructtemplate and surfaces much later as an opaquestruct.error– which is exactly how aPad1option used to fail to parse.
- pcapkit.protocols.schema.internet.mh.bid_address_selector(pkt)[source]¶
Selector function for
BindingIdentifierOption.addressfield.
- pcapkit.protocols.schema.internet.mh.br_code_selector(pkt)[source]¶
Selector function for
BindingRevocationMessage.codefield.- Parameters:
- Return type:
- Returns:
Returns an
EnumFieldover the registry the octet draws from, which depends on which of the two forms of the message this is: a revocation trigger in a Binding Revocation Indication and a status code in a Binding Revocation Acknowledgement [RFC 5846 Section 5.1, RFC 5846 Section 5.2].
- pcapkit.protocols.schema.internet.mh.dmnp_prefix_selector(pkt)[source]¶
Selector function for
DelegatedMNPOption.prefixfield.
- pcapkit.protocols.schema.internet.mh.fb_code_selector(pkt)[source]¶
Selector function for
FlowBindingMessage.codefield.- Parameters:
- Return type:
- Returns:
Returns an
EnumFieldover the registry the octet draws from, which depends on which of the two forms of the message this is: an indication trigger in a Flow Binding Indication and a status code in a Flow Binding Acknowledgement [RFC 7109 Section 6.1.1, RFC 7109 Section 6.1.2].
- pcapkit.protocols.schema.internet.mh.lma_address_selector(pkt)[source]¶
Selector function for
LMAAddressOption.addressfield.
- pcapkit.protocols.schema.internet.mh.lma_user_plane_selector(pkt)[source]¶
Selector function for
LMAUserPlaneAddressOption.addressfield.- Parameters:
- Return type:
- Returns:
Returns a
FieldBaseinstance sized from the option length. RFC 7389 Section 4 lets the address be absent as well as IPv4 or IPv6 – a mobile access gateway sends the option with no address at all, or with an all-zero one, purely to say which transport it wants.
- pcapkit.protocols.schema.internet.mh.pad_subopt_data_len(pkt)[source]¶
Return the length of the padding data of a flow identification padding sub-option.
- Parameters:
- Return type:
- Returns:
Number of padding octets carried after the sub-option header, i.e. the value of the
Sub-Opt Lengthfield of aPadNsub-option, and zero for the one-octetPadsub-option, which carries no such field.
See also
pad_opt_data_len(), which does the same job for the mobility options themselves and documents why the test has to be on the field value rather than on the presence of its key.
- pcapkit.protocols.schema.internet.mh.target_coa_selector(pkt)[source]¶
Selector function for
TargetCareofAddressSuboption.addressfield.
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.
- 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.
- interval: timedelta¶
Refresh interval before re-registration. Counted on the wire in units of 4 seconds [RFC 6275 Section 6.2.4].
- 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.
- class pcapkit.protocols.data.internet.mh.MNIDOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MN-ID option.
- subtype: MNIDSubtype¶
Subtype.
- identifier: bytes | str | IPv6Address¶
Identifier.
- class pcapkit.protocols.data.internet.mh.AuthOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for Mobility Message Authentication option.
- subtype: AuthSubtype¶
Subtype.
- class pcapkit.protocols.data.internet.mh.MesgIDOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for Mobility Message Replay Protection option.
- 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: CGAExtension¶
Extension type.
- class pcapkit.protocols.data.internet.mh.CGAParameter(*args: VT, **kwargs: VT)[source]¶
Bases:
DataData model for CGA parameter.
- extensions: OrderedMultiDict[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.ExperimentalMobilityOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Experimental Mobility option.
- class pcapkit.protocols.data.internet.mh.BADFOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Binding Authorization Data for FMIPv6 (BADF) option.
- class pcapkit.protocols.data.internet.mh.IPv6AddressPrefixOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Mobility Header IPv6 Address/Prefix option.
- code: IPv6AddressPrefixCode¶
Option code, c.f., RFC 5568 Section 6.4.2. The codes are defined inline by the RFC with no IANA registry behind them, so this field carries the module-local
IPv6AddressPrefixCode.
- address: IPv6Address¶
IPv6 address/prefix. Kept separate from
prefix_lengthsince option codes1through3carry a full address whose host bits are significant, so the pair cannot always be fused into a network.
- 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[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[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[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[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[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.
- options: OrderedMultiDict[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: StatusCode¶
Status.
- options: OrderedMultiDict[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: BindingError¶
Status.
- home: IPv6Address¶
Home address.
- options: OrderedMultiDict[Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.FastBindingUpdateMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Fast Binding Update (FBU) message type.
- lifetime: timedelta¶
Lifetime. RFC 5568 Section 6.2.2 counts this in seconds rather than in the units of 4 seconds the binding messages use.
- options: OrderedMultiDict[Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.FastBindingAcknowledgmentMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Fast Binding Acknowledgment (FBack) message type.
- status: FastBindingAcknowledgmentStatus¶
Status. RFC 5568 Section 6.2.3 defines the FBack status values inline rather than drawing them from the IANA Status Codes registry, so this field carries the module-local
FastBindingAcknowledgmentStatusinstead ofStatusCode.
- lifetime: timedelta¶
Lifetime. RFC 5568 Section 6.2.3 counts this in seconds rather than in the units of 4 seconds the binding messages use.
- options: OrderedMultiDict[Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.FastNeighborAdvertisementMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Fast Neighbor Advertisement (FNA) message type.
- options: OrderedMultiDict[Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.ExperimentalMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Experimental Mobility Header message type.
- class pcapkit.protocols.data.internet.mh.HandoverInitiateMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Handover Initiate (HI) message type.
- code: HandoverInitiateStatus¶
Code.
- options: OrderedMultiDict[Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.HandoverAcknowledgeMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Handover Acknowledge (HAck) message type.
- code: HandoverACKStatus¶
Code.
- options: OrderedMultiDict[Option, Option]¶
Mobility options.
Footnotes
- class pcapkit.protocols.data.internet.mh.HeartbeatMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Heartbeat message type.
- unsolicited: bool¶
Unsolicited flag. Set in an unsolicited Heartbeat response, in which case
seqis ignored and no response is expected.
- options: OrderedMultiDict[Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.HomeAgentSwitchMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Home Agent Switch message type.
- addresses: tuple[IPv6Address, ...]¶
Alternate home agent addresses. An empty tuple asks the mobile node to run home agent discovery instead.
- options: OrderedMultiDict[Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.BindingRevocationMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Binding Revocation message type.
Both forms of the message – the Binding Revocation Indication and the Binding Revocation Acknowledgement – share this model, since they share a Mobility Header type and differ only in
br_typeand in whatcodemeans.- br_type: BindingRevocation¶
Binding revocation type, saying which form of the message this is.
- code: RevocationTrigger | RevocationStatusCode¶
Revocation trigger in an indication, acknowledgement status in an acknowledgement. The two draw from different registries, which is why the field is not split in two.
- options: OrderedMultiDict[Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.LocalizedRoutingInitiationMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Localized Routing Initiation message type.
- lifetime: timedelta¶
Lifetime. RFC 6705 Section 10.1 counts this in seconds rather than in the units of 4 seconds the binding messages use.
- options: OrderedMultiDict[Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.LocalizedRoutingAcknowledgmentMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Localized Routing Acknowledgment message type.
- status: LocalizedRoutingStatus¶
Status. RFC 6705 Section 10.2 defines its values inline with no IANA registry behind them, so this field carries the module-local
LocalizedRoutingStatusrather thanStatusCode.
- options: OrderedMultiDict[Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.UpdateNotificationMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Update Notification message type.
- reason: UpdateNotificationReason¶
Notification reason.
- options: OrderedMultiDict[Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.UpdateNotificationAcknowledgementMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Update Notification Acknowledgement message type.
- status: UpdateNotificationACKStatus¶
Status.
- options: OrderedMultiDict[Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.FlowBindingMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Flow Binding message type.
Both forms of the message – the Flow Binding Indication and the Flow Binding Acknowledgement – share this model, since they share a Mobility Header type and differ only in
fb_typeand in whatcodemeans.- fb_type: FlowBindingType¶
Flow binding type, saying which form of the message this is.
- code: FlowBindingIndicationTrigger | FlowBindingACKStatus¶
Indication trigger in an indication, acknowledgement status in an acknowledgement.
- ack: bool¶
Acknowledgement requested flag. Only meaningful in an indication; an acknowledgement reserves the whole octet this bit is taken from.
- options: OrderedMultiDict[Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.SubscriptionQueryMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Subscription Query message type.
- options: OrderedMultiDict[Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.SubscriptionResponseMessage(*args: VT, **kwargs: VT)[source]¶
Bases:
MHData model for MH Subscription Response message type.
- info: bool¶
Multicast information flag, set when the response carries active multicast subscription options.
- options: OrderedMultiDict[Option, Option]¶
Mobility options.
- class pcapkit.protocols.data.internet.mh.HomeNetworkPrefixOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Home Network Prefix option.
- prefix: IPv6Address¶
Home network prefix. Kept apart from
prefix_lengthrather than fused into anIPv6Network, so that a prefix whose bits pastprefix_lengthare non-zero survives a round trip – masking them off, which is what building a network does, would not reproduce the octets that were parsed. Same reasoning asIPv6AddressPrefixOption.
- class pcapkit.protocols.data.internet.mh.HandoffIndicatorOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Handoff Indicator option.
- hi: HandoffType¶
Handoff indicator.
- class pcapkit.protocols.data.internet.mh.AccessTechnologyTypeOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Access Technology Type option.
- att: AccessType¶
Access technology type.
- class pcapkit.protocols.data.internet.mh.MNLLIdentifierOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Mobile Node Link-layer Identifier option.
- class pcapkit.protocols.data.internet.mh.LinkLocalAddressOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Link-local Address option.
- address: IPv6Address¶
Link-local address.
- class pcapkit.protocols.data.internet.mh.TimestampOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Timestamp option.
- pmip_timestamp: PMIPv6Timestamp¶
Timestamp in the fixed-point format of RFC 5213 Section 8.8, kept alongside
timestampso that the 1/65536-second resolution of the wire format survives a round trip.
- class pcapkit.protocols.data.internet.mh.RestartCounterOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Restart Counter option.
- class pcapkit.protocols.data.internet.mh.DNSUpdateOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH DNS-UPDATE-TYPE option.
- status: DNSStatusCode¶
Status. RFC 5026 Section 8.1 draws this from a registry of its own rather than from the general mobility status codes.
- class pcapkit.protocols.data.internet.mh.VendorSpecificOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Vendor Specific mobility option.
- class pcapkit.protocols.data.internet.mh.ServiceSelectionOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Service Selection mobility option.
- class pcapkit.protocols.data.internet.mh.IPv4HomeAddressOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH IPv4 Home Address option.
- prefix_length: int¶
Prefix length.
32means the option carries a single address rather than a prefix;0is invalid.
- address: IPv4Address¶
IPv4 home address.
0.0.0.0asks the home agent to allocate one dynamically. Kept apart fromprefix_lengthso that the host bits, which are significant here, survive a round trip.
- class pcapkit.protocols.data.internet.mh.IPv4AddressAcknowledgementOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH IPv4 Address Acknowledgement option.
- status: DSMIPv6HomeAddress¶
Status. RFC 5555 Section 3.2.1 draws this from the DSMIPv6 IPv4 home address registry, which is not the one the IPv4 Home Address Reply option of RFC 5844 uses – that one lacks value 133.
- prefix_length: int¶
Allocated prefix length. Meaningful only on success, and required to be zero on failure.
- address: IPv4Address¶
Assigned IPv4 home address.
- class pcapkit.protocols.data.internet.mh.NATDetectionOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH NAT Detection option.
- class pcapkit.protocols.data.internet.mh.IPv4CareofAddressOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH IPv4 Care-of Address option.
- address: IPv4Address¶
IPv4 care-of address.
- class pcapkit.protocols.data.internet.mh.GREKeyOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH GRE Key option.
- key: int | None¶
GRE key identifier, or
Nonewhen the option carries none – which RFC 5845 Section 6.1 signals by an option length of 2 rather than 6.
- class pcapkit.protocols.data.internet.mh.BindingIdentifierOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Binding Identifier (BID) option.
- status: StatusCode¶
Status, overriding the message status for this binding alone.
- bid_pri: int¶
Binding priority. RFC 6089 Section 4.1 renames the bits RFC 5648 reserved;
0means the sender predates RFC 6089.
- address: IPv4Address | IPv6Address | None¶
Care-of address, or
Nonewhen the option carries none.
- class pcapkit.protocols.data.internet.mh.IPv4HomeAddressRequestOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH IPv4 Home Address Request option.
- address: IPv4Address¶
Requested IPv4 home address.
0.0.0.0asks the local mobility anchor to allocate one.
- class pcapkit.protocols.data.internet.mh.IPv4HomeAddressReplyOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH IPv4 Home Address Reply option.
- status: HomeAddressReply¶
Status. RFC 5844 Section 3.3.2 draws this from a registry of its own, which unlike the DSMIPv6 one of RFC 5555 has no value 133.
- address: IPv4Address¶
Assigned IPv4 home address.
- class pcapkit.protocols.data.internet.mh.IPv4DefaultRouterAddressOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH IPv4 Default-Router Address option.
- address: IPv4Address¶
IPv4 default-router address.
- class pcapkit.protocols.data.internet.mh.IPv4DHCPSupportModeOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH IPv4 DHCP Support Mode option.
- mode: DHCPSupportMode¶
DHCP support mode. Unset means the mobile access gateway acts as a DHCP relay, set that it acts as a DHCP server.
- class pcapkit.protocols.data.internet.mh.ContextRequestOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Context Request option.
- requests: tuple[ContextRequest, ...]¶
Requested contexts.
- class pcapkit.protocols.data.internet.mh.LMAAddressOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Local Mobility Anchor Address option.
- code: LMAAddressCode¶
Option code, c.f., RFC 5949 Section 6.2.2. The codes are defined inline by the RFC with no IANA registry behind them, so this field carries the module-local
LMAAddressCode.
- address: IPv4Address | IPv6Address | bytes¶
Local mobility anchor address.
- class pcapkit.protocols.data.internet.mh.MNLLAIIDOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Mobile Node Link-local Address Interface Identifier option.
- class pcapkit.protocols.data.internet.mh.TransientBindingOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Transient Binding option.
- class pcapkit.protocols.data.internet.mh.FlowSummaryOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Flow Summary mobility option.
- class pcapkit.protocols.data.internet.mh.FlowIdentificationOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Flow Identification mobility option.
- status: FlowIDStatus¶
Status.
- suboptions: OrderedMultiDict[FlowIDSuboption, FlowIdentificationSuboption]¶
Sub-options.
- class pcapkit.protocols.data.internet.mh.RedirectCapabilityOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Redirect-Capability mobility option.
- class pcapkit.protocols.data.internet.mh.RedirectOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Redirect mobility option.
- ipv6: IPv6Address | None¶
IPv6 address of the redirected-to local mobility anchor, if carried.
- ipv4: IPv4Address | None¶
IPv4 address of the redirected-to local mobility anchor, if carried.
- class pcapkit.protocols.data.internet.mh.LoadInformationOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Load Information mobility option.
- class pcapkit.protocols.data.internet.mh.AlternateIPv4CareofAddressOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Alternate IPv4 Care-of Address option.
- address: IPv4Address¶
Alternate IPv4 care-of address.
- class pcapkit.protocols.data.internet.mh.MNGroupIdentifierOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Mobile Node Group Identifier option.
- class pcapkit.protocols.data.internet.mh.MAGIPv6AddressOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH MAG IPv6 Address option.
- address: IPv6Address¶
MAG IPv6 address.
- class pcapkit.protocols.data.internet.mh.AccessNetworkIdentifierOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Access Network Identifier option.
- suboptions: OrderedMultiDict[ANISuboption, ANISuboption]¶
Sub-options.
- class pcapkit.protocols.data.internet.mh.IPv4TrafficOffloadSelectorOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH IPv4 Traffic Offload Selector option.
- mode: bool¶
Offload mode flag. Unset offloads the flows matching the selector; set offloads everything except them.
- selector: OrderedMultiDict[FlowIDSuboption, FlowIdentificationSuboption]¶
Traffic selector sub-options.
- class pcapkit.protocols.data.internet.mh.DynamicIPMulticastSelectorOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Dynamic IP Multicast Selector option.
- class pcapkit.protocols.data.internet.mh.DelegatedMNPOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Delegated Mobile Network Prefix option.
- prefix: IPv4Address | IPv6Address¶
Delegated mobile network prefix, IPv4 or IPv6 as
ipv4says.
- class pcapkit.protocols.data.internet.mh.ActiveMulticastSubscriptionIPv4Option(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Active Multicast Subscription IPv4 option.
- class pcapkit.protocols.data.internet.mh.ActiveMulticastSubscriptionIPv6Option(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Active Multicast Subscription IPv6 option.
- class pcapkit.protocols.data.internet.mh.QualityOfServiceOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Quality-of-Service option.
- oc: int¶
0response,1allocate,2de-allocate,3modify,4query,5negotiate.- Type:
Operational code
- attributes: OrderedMultiDict[QoSAttribute, QoSAttribute]¶
Quality-of-service attributes.
- class pcapkit.protocols.data.internet.mh.LMAUserPlaneAddressOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH LMA User-Plane Address option.
- address: IPv4Address | IPv6Address | None¶
LMA user-plane address, or
Nonewhen the option carries none – which is how a mobile access gateway asks for a transport without naming an address.
- class pcapkit.protocols.data.internet.mh.MulticastMobilityOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Multicast Mobility option.
- class pcapkit.protocols.data.internet.mh.MulticastAcknowledgementOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Multicast Acknowledgement option.
- class pcapkit.protocols.data.internet.mh.LMAControlledMAGParametersOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH LMA-Controlled MAG Parameters option.
- suboptions: OrderedMultiDict[LMAControlledMAGSuboption, LMAControlledMAGSuboption]¶
Sub-options.
- class pcapkit.protocols.data.internet.mh.MAGMultipathBindingOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH MAG Multipath Binding option.
- att: AccessType¶
Interface access-technology type.
- class pcapkit.protocols.data.internet.mh.MAGIdentifierOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH MAG Identifier option.
- subtype: MNIDSubtype¶
Sub-type, drawn from the mobile node identifier subtype registry.
- class pcapkit.protocols.data.internet.mh.AnchoredPrefixOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Anchored Prefix option.
- prefix: IPv6Address¶
Anchored prefix. Kept apart from
prefix_lengthso that the bits past it, which RFC 8885 Section 4.3 tells a receiver to ignore rather than requires a sender to zero, survive a round trip.
- class pcapkit.protocols.data.internet.mh.LocalPrefixOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Local Prefix option.
- prefix: IPv6Address¶
Local prefix.
- class pcapkit.protocols.data.internet.mh.PreviousMAAROption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Previous MAAR option.
- maar: IPv6Address¶
Previous MAAR’s global address. A full address rather than a prefix, so
prefix_lengthdoes not apply to it.
- prefix: IPv6Address¶
Mobile node’s home network prefix.
- class pcapkit.protocols.data.internet.mh.ServingMAAROption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH Serving MAAR option.
- address: IPv6Address¶
Serving MAAR’s global address.
- class pcapkit.protocols.data.internet.mh.DLIFLinkLocalAddressOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH DLIF Link-Local Address option.
- address: IPv6Address¶
Distributed logical interface’s link-local address.
- class pcapkit.protocols.data.internet.mh.DLIFLinkLayerAddressOption(*args: VT, **kwargs: VT)[source]¶
Bases:
OptionData model for MH DLIF Link-Layer Address option.
- class pcapkit.protocols.data.internet.mh.ContextRequest(*args: VT, **kwargs: VT)[source]¶
Bases:
DataData model for one entry of an MH Context Request option.
- class pcapkit.protocols.data.internet.mh.FlowIdentificationSuboption(dict_=None, **kwargs)[source]¶
Bases:
DataData model for MH Flow Identification sub-options.
- type: FlowIDSuboption¶
Sub-option type.
- class pcapkit.protocols.data.internet.mh.UnassignedFlowIdentificationSuboption(*args: VT, **kwargs: VT)[source]¶
Bases:
FlowIdentificationSuboptionData model for unassigned MH Flow Identification sub-options.
- class pcapkit.protocols.data.internet.mh.PadFlowIdentificationSuboption(*args: VT, **kwargs: VT)[source]¶
Bases:
FlowIdentificationSuboptionData model for MH Flow Identification padding sub-options.
- class pcapkit.protocols.data.internet.mh.BIDReferenceSuboption(*args: VT, **kwargs: VT)[source]¶
Bases:
FlowIdentificationSuboptionData model for MH Flow Identification BID Reference sub-option.
- class pcapkit.protocols.data.internet.mh.TrafficSelectorSuboption(*args: VT, **kwargs: VT)[source]¶
Bases:
FlowIdentificationSuboptionData model for MH Flow Identification Traffic Selector sub-option.
- ts_format: TrafficSelector¶
Traffic selector format.
- class pcapkit.protocols.data.internet.mh.FlowBindingActionSuboption(*args: VT, **kwargs: VT)[source]¶
Bases:
FlowIdentificationSuboptionData model for MH Flow Identification Flow Binding Action sub-option.
- action: FlowBindingAction¶
Flow binding action.
- class pcapkit.protocols.data.internet.mh.TargetCareofAddressSuboption(*args: VT, **kwargs: VT)[source]¶
Bases:
FlowIdentificationSuboptionData model for MH Flow Identification Target Care-of Address sub-option.
- address: IPv4Address | IPv6Address | bytes¶
Target care-of address.
- class pcapkit.protocols.data.internet.mh.ANISuboption(dict_=None, **kwargs)[source]¶
Bases:
DataData model for MH Access Network Identifier sub-options.
- type: ANISuboption¶
Sub-option type.
- class pcapkit.protocols.data.internet.mh.UnassignedANISuboption(*args: VT, **kwargs: VT)[source]¶
Bases:
ANISuboptionData model for unassigned MH Access Network Identifier sub-options.
- class pcapkit.protocols.data.internet.mh.ANINetworkIdentifierSuboption(*args: VT, **kwargs: VT)[source]¶
Bases:
ANISuboptionData model for MH Network-Identifier ANI sub-option.
- class pcapkit.protocols.data.internet.mh.ANIGeoLocationSuboption(*args: VT, **kwargs: VT)[source]¶
Bases:
ANISuboptionData model for MH Geo-Location ANI sub-option.
- class pcapkit.protocols.data.internet.mh.ANIOperatorIdentifierSuboption(*args: VT, **kwargs: VT)[source]¶
Bases:
ANISuboptionData model for MH Operator-Identifier ANI sub-option.
- op_id_type: OperatorID¶
Operator identifier type.
- class pcapkit.protocols.data.internet.mh.ANICivicLocationSuboption(*args: VT, **kwargs: VT)[source]¶
Bases:
ANISuboptionData model for MH Civic-Location ANI sub-option.
- format: int¶
Encoding format; only
0, the binary encoding of RFC 4776 Section 3.1, is defined.
- class pcapkit.protocols.data.internet.mh.ANIMAGGroupIdentifierSuboption(*args: VT, **kwargs: VT)[source]¶
Bases:
ANISuboptionData model for MH MAG-Group-Identifier ANI sub-option.
- class pcapkit.protocols.data.internet.mh.ANIUpdateTimerSuboption(*args: VT, **kwargs: VT)[source]¶
Bases:
ANISuboptionData model for MH ANI Update-Timer sub-option.
- class pcapkit.protocols.data.internet.mh.QoSAttribute(dict_=None, **kwargs)[source]¶
Bases:
DataData model for MH Quality-of-Service attributes.
- type: QoSAttribute¶
Attribute type.
- class pcapkit.protocols.data.internet.mh.UnassignedQoSAttribute(*args: VT, **kwargs: VT)[source]¶
Bases:
QoSAttributeData model for unassigned MH Quality-of-Service attributes.
- class pcapkit.protocols.data.internet.mh.BitRateAttribute(*args: VT, **kwargs: VT)[source]¶
Bases:
QoSAttributeData model for the MH Quality-of-Service attributes carrying a bare bit rate.
- class pcapkit.protocols.data.internet.mh.PerSessionBitRateAttribute(*args: VT, **kwargs: VT)[source]¶
Bases:
QoSAttributeData model for the MH per-session aggregate maximum bit-rate attributes.
- class pcapkit.protocols.data.internet.mh.AllocationRetentionPriorityAttribute(*args: VT, **kwargs: VT)[source]¶
Bases:
QoSAttributeData model for the MH Allocation-Retention-Priority attribute.
- class pcapkit.protocols.data.internet.mh.QoSTrafficSelectorAttribute(*args: VT, **kwargs: VT)[source]¶
Bases:
QoSAttributeData model for the MH QoS-Traffic-Selector attribute.
- ts_format: TrafficSelector¶
Traffic selector format.
- selector: bytes¶
Traffic selector, kept opaque as for
TrafficSelectorSuboption.
- class pcapkit.protocols.data.internet.mh.QoSVendorSpecificAttribute(*args: VT, **kwargs: VT)[source]¶
Bases:
QoSAttributeData model for the MH QoS-Vendor-Specific attribute.
- class pcapkit.protocols.data.internet.mh.LMAControlledMAGSuboption(dict_=None, **kwargs)[source]¶
Bases:
DataData model for MH LMA-Controlled MAG Parameters sub-options.
- type: LMAControlledMAGSuboption¶
Sub-option type.
- class pcapkit.protocols.data.internet.mh.UnassignedLMAControlledMAGSuboption(*args: VT, **kwargs: VT)[source]¶
Bases:
LMAControlledMAGSuboptionData model for unassigned MH LMA-Controlled MAG Parameters sub-options.
- class pcapkit.protocols.data.internet.mh.BindingReregistrationControlSuboption(*args: VT, **kwargs: VT)[source]¶
Bases:
LMAControlledMAGSuboptionData model for MH Binding Re-registration Control sub-option.
- class pcapkit.protocols.data.internet.mh.HeartbeatControlSuboption(*args: VT, **kwargs: VT)[source]¶
Bases:
LMAControlledMAGSuboptionData model for MH Heartbeat Control sub-option.
- class pcapkit.protocols.data.internet.mh.ExperimentalExtension(*args: VT, **kwargs: VT)[source]¶
Bases:
CGAExtensionData model for experimental CGA extensions.
RFC 4581 Section 3 assigns the three experimental extension types but gives their extension data no structure at all, so
datais opaque by specification rather than merely undecoded.