7
7
from pcapkit .protocols .data .data import Data
8
8
9
9
if TYPE_CHECKING :
10
+ from datetime import datetime as dt_type
11
+ from ipaddress import IPv6Address , IPv6Network
12
+
13
+ from pcapkit .const .mh .access_type import AccessType as Enum_AccessType
14
+ from pcapkit .const .mh .ack_status_code import ACKStatusCode as Enum_ACKStatusCode
15
+ from pcapkit .const .mh .ani_suboption import ANISuboption as Enum_ANISuboption
16
+ from pcapkit .const .mh .auth_subtype import AuthSubtype as Enum_AuthSubtype
17
+ from pcapkit .const .mh .binding_ack_flag import BindingACKFlag as Enum_BindingACKFlag
18
+ from pcapkit .const .mh .binding_revocation import BindingRevocation as Enum_BindingRevocation
19
+ from pcapkit .const .mh .binding_update_flag import BindingUpdateFlag as Enum_BindingUpdateFlag
20
+ from pcapkit .const .mh .cga_extension import CGAExtension as Enum_CGAExtension
21
+ from pcapkit .const .mh .cga_type import CGAType as Enum_CGAType
22
+ from pcapkit .const .mh .dhcp_support_mode import DHCPSupportMode as Enum_DHCPSupportMode
23
+ from pcapkit .const .mh .dns_status_code import DNSStatusCode as Enum_DNSStatusCode
24
+ from pcapkit .const .mh .dsmip6_tls_packet import DSMIP6TLSPacket as Enum_DSMIP6TLSPacket
25
+ from pcapkit .const .mh .dsmipv6_home_address import DSMIPv6HomeAddress as Enum_DSMIPv6HomeAddress
26
+ from pcapkit .const .mh .enumerating_algorithm import \
27
+ EnumeratingAlgorithm as Enum_EnumeratingAlgorithm
28
+ from pcapkit .const .mh .fb_ack_status import FlowBindingACKStatus as Enum_FlowBindingACKStatus
29
+ from pcapkit .const .mh .fb_action import FlowBindingAction as Enum_FlowBindingAction
30
+ from pcapkit .const .mh .fb_indication_trigger import \
31
+ FlowBindingIndicationTrigger as Enum_FlowBindingIndicationTrigger
32
+ from pcapkit .const .mh .fb_type import FlowBindingType as Enum_FlowBindingType
33
+ from pcapkit .const .mh .flow_id_status import FlowIDStatus as Enum_FlowIDStatus
34
+ from pcapkit .const .mh .flow_id_suboption import FlowIDSuboption as Enum_FlowIDSuboption
35
+ from pcapkit .const .mh .handoff_type import HandoffType as Enum_HandoffType
36
+ from pcapkit .const .mh .handover_ack_flag import HandoverACKFlag as Enum_HandoverACKFlag
37
+ from pcapkit .const .mh .handover_ack_status import HandoverACKStatus as Enum_HandoverACKStatus
38
+ from pcapkit .const .mh .handover_initiate_flag import \
39
+ HandoverInitiateFlag as Enum_HandoverInitiateFlag
40
+ from pcapkit .const .mh .home_address_reply import HomeAddressReply as Enum_HomeAddressReply
41
+ from pcapkit .const .mh .lla_code import LLACode as Enum_LLACode
42
+ from pcapkit .const .mh .lma_mag_suboption import \
43
+ LMAControlledMAGSuboption as Enum_LMAControlledMAGSuboption
44
+ from pcapkit .const .mh .mn_group_id import MNGroupID as Enum_MNGroupID
45
+ from pcapkit .const .mh .mn_id_subtype import MNIDSubtype as Enum_MNIDSubtype
46
+ from pcapkit .const .mh .operator_id import OperatorID as Enum_OperatorID
47
+ from pcapkit .const .mh .option import Option as Enum_Option
10
48
from pcapkit .const .mh .packet import Packet
49
+ from pcapkit .const .mh .packet import Packet as Enum_Packet
50
+ from pcapkit .const .mh .qos_attribute import QoSAttribute as Enum_QoSAttribute
51
+ from pcapkit .const .mh .revocation_status_code import \
52
+ RevocationStatusCode as Enum_RevocationStatusCode
53
+ from pcapkit .const .mh .revocation_trigger import RevocationTrigger as Enum_RevocationTrigger
54
+ from pcapkit .const .mh .status_code import StatusCode as Enum_StatusCode
55
+ from pcapkit .const .mh .traffic_selector import TrafficSelector as Enum_TrafficSelector
56
+ from pcapkit .const .mh .upa_status import \
57
+ UpdateNotificationACKStatus as Enum_UpdateNotificationACKStatus
58
+ from pcapkit .const .mh .upn_reason import \
59
+ UpdateNotificationReason as Enum_UpdateNotificationReason
11
60
from pcapkit .const .reg .transtype import TransType
61
+ from pcapkit .corekit .multidict import OrderedMultiDict
62
+ from pcapkit .protocols .internet .mh import NTPTimestamp
63
+
64
+
65
+ __all__ = [
66
+ 'MH' ,
67
+
68
+ 'Option' ,
69
+ 'UnassignedOption' , 'PadOption' , 'BindRefreshAdviceOption' , 'AlternateCareofAddressOption' ,
70
+ 'NonceIndicesOption' , 'BindingAuthorizationDataOption' , 'MobileNetworkPrefixOption' ,
71
+ 'LinkLayerAddressOption' , 'MNIDOption' , 'AuthOption' , 'MesgIDOption' , 'CGAParametersRequestOption' ,
72
+ 'CGAParametersOption' ,
12
73
13
- __all__ = ['MH' ]
74
+ 'CGAParameter' ,
75
+
76
+ 'CGAExtension' ,
77
+ 'UnknownExtension' , 'MultiPrefixExtension' ,
78
+
79
+ ]
14
80
15
81
16
82
@info_final
@@ -30,3 +96,215 @@ class MH(Data):
30
96
31
97
if TYPE_CHECKING :
32
98
def __init__ (self , next : 'TransType' , length : 'int' , type : 'Packet' , chksum : 'bytes' , data : 'bytes' ) -> 'None' : ... # pylint: disable=unused-argument,super-init-not-called,multiple-statements,redefined-builtin,line-too-long
99
+
100
+
101
+ class Option (Data ):
102
+ """Data model for MH options."""
103
+
104
+ #: Option type.
105
+ type : 'Enum_Option'
106
+ #: Option length (incl. type and length fields).
107
+ length : 'int'
108
+
109
+
110
+ @info_final
111
+ class UnassignedOption (Option ):
112
+ """Data model for unassigned MH options."""
113
+
114
+ #: Option data.
115
+ data : 'bytes'
116
+
117
+ if TYPE_CHECKING :
118
+ def __init__ (self , type : 'Enum_Option' , length : 'int' , data : 'bytes' ) -> 'None' : ...
119
+
120
+
121
+ @info_final
122
+ class PadOption (Option ):
123
+ """Data model for Pad option."""
124
+
125
+ if TYPE_CHECKING :
126
+ def __init__ (self , type : 'Enum_Option' , length : 'int' ) -> 'None' : ...
127
+
128
+
129
+ @info_final
130
+ class BindRefreshAdviceOption (Option ):
131
+ """Data model for Binding Refresh Advice option."""
132
+
133
+ #: Refresh interval.
134
+ interval : 'int'
135
+
136
+ if TYPE_CHECKING :
137
+ def __init__ (self , type : 'Enum_Option' , length : 'int' , interval : 'int' ) -> 'None' : ...
138
+
139
+
140
+ @info_final
141
+ class AlternateCareofAddressOption (Option ):
142
+ """Data model for Alternate Care-of Address option."""
143
+
144
+ #: Alternate care-of address.
145
+ address : 'IPv6Address'
146
+
147
+ if TYPE_CHECKING :
148
+ def __init__ (self , type : 'Enum_Option' , length : 'int' , address : 'IPv6Address' ) -> 'None' : ...
149
+
150
+
151
+ @info_final
152
+ class NonceIndicesOption (Option ):
153
+ """Data model for Nonce Indices option."""
154
+
155
+ #: Home nonce index.
156
+ home : 'int'
157
+ #: Care-of nonce index.
158
+ careof : 'int'
159
+
160
+ if TYPE_CHECKING :
161
+ def __init__ (self , type : 'Enum_Option' , length : 'int' , home : 'int' , careof : 'int' ) -> 'None' : ...
162
+
163
+
164
+ @info_final
165
+ class BindingAuthorizationDataOption (Option ):
166
+ """Data model for Binding Authorization Data option."""
167
+
168
+ #: Authenticator.
169
+ data : 'bytes'
170
+
171
+ if TYPE_CHECKING :
172
+ def __init__ (self , type : 'Enum_Option' , length : 'int' , data : 'bytes' ) -> 'None' : ...
173
+
174
+
175
+ @info_final
176
+ class MobileNetworkPrefixOption (Option ):
177
+ """Data model for Mobile Network Prefix option."""
178
+
179
+ #: Mobile Network Prefix.
180
+ prefix : 'IPv6Network'
181
+
182
+ if TYPE_CHECKING :
183
+ def __init__ (self , type : 'Enum_Option' , length : 'int' , prefix : 'IPv6Network' ) -> 'None' : ...
184
+
185
+
186
+ @info_final
187
+ class LinkLayerAddressOption (Option ):
188
+ """Data model for MH Link-Layer Address (MH-LLA) option."""
189
+
190
+ #: Option code.
191
+ code : 'Enum_LLACode'
192
+ #: Link-layer address (LLA).
193
+ lla : 'bytes'
194
+
195
+ if TYPE_CHECKING :
196
+ def __init__ (self , type : 'Enum_Option' , length : 'int' , code : 'Enum_LLACode' , lla : 'bytes' ) -> 'None' : ...
197
+
198
+
199
+ @info_final
200
+ class MNIDOption (Option ):
201
+ """Data model for MN-ID option."""
202
+
203
+ #: Subtype.
204
+ subtype : 'Enum_MNIDSubtype'
205
+ #: Identifier.
206
+ identifier : 'bytes | str | IPv6Address'
207
+
208
+ if TYPE_CHECKING :
209
+ def __init__ (self , type : 'Enum_Option' , length : 'int' , subtype : 'Enum_MNIDSubtype' , identifier : 'bytes | str | IPv6Address' ) -> 'None' : ...
210
+
211
+
212
+ @info_final
213
+ class AuthOption (Option ):
214
+ """Data model for Mobility Message Authentication option."""
215
+
216
+ #: Subtype.
217
+ subtype : 'Enum_AuthSubtype'
218
+ #: Mobility SPI.
219
+ spi : 'int'
220
+ #: Authentication data.
221
+ data : 'bytes'
222
+
223
+ if TYPE_CHECKING :
224
+ def __init__ (self , type : 'Enum_Option' , length : 'int' , subtype : 'Enum_AuthSubtype' , spi : 'int' , data : 'bytes' ) -> 'None' : ...
225
+
226
+
227
+ @info_final
228
+ class MesgIDOption (Option ):
229
+ """Data model for Mobility Message Replay Protection option."""
230
+
231
+ #: Timestamp.
232
+ timestamp : 'dt_type'
233
+ #: NTP timestamp, c.f., :rfc:`1305`.
234
+ ntp_timestamp : 'NTPTimestamp'
235
+
236
+ if TYPE_CHECKING :
237
+ def __init__ (self , type : 'Enum_Option' , length : 'int' , timestamp : 'dt_type' , ntp_timestamp : 'NTPTimestamp' ) -> 'None' : ...
238
+
239
+
240
+ @info_final
241
+ class CGAParametersRequestOption (Option ):
242
+ """Data model for CGA Parameters Request option."""
243
+
244
+ if TYPE_CHECKING :
245
+ def __init__ (self , type : 'Enum_Option' , length : 'int' ) -> 'None' : ...
246
+
247
+
248
+ class CGAExtension (Data ):
249
+ """Data model for CGA extension."""
250
+
251
+ #: Extension type.
252
+ type : 'Enum_CGAExtension'
253
+ #: Extension length.
254
+ length : 'int'
255
+
256
+
257
+ @info_final
258
+ class UnknownExtension (CGAExtension ):
259
+ """Data model for unknown CGA extensions."""
260
+
261
+ #: Extension data.
262
+ data : 'bytes'
263
+
264
+ if TYPE_CHECKING :
265
+ def __init__ (self , type : 'Enum_CGAExtension' , length : 'int' , data : 'bytes' ) -> 'None' : ...
266
+
267
+
268
+ @info_final
269
+ class MultiPrefixExtension (CGAExtension ):
270
+ """Data model for Multi-Prefix CGA extension."""
271
+
272
+ #: P flag. Set if a public key is included in the Public Key field of
273
+ #: the CGA Parameter Data Structure, reset otherwise.
274
+ flag : 'bool'
275
+ #: Prefixes.
276
+ prefixes : 'tuple[int, ...]'
277
+
278
+ if TYPE_CHECKING :
279
+ def __init__ (self , type : 'Enum_CGAExtension' , length : 'int' , flag : 'bool' , prefixes : 'tuple[int, ...]' ) -> 'None' : ...
280
+
281
+
282
+ @info_final
283
+ class CGAParameter (Data ):
284
+ """Data model for CGA parameter."""
285
+
286
+ #: Modifier.
287
+ modifier : 'Enum_CGAType'
288
+ #: Subnet prefix.
289
+ prefix : 'int'
290
+ #: Collision count.
291
+ collision_count : 'int'
292
+ #: Publick key (ASN.1 encoded).
293
+ public_key : 'bytes'
294
+ #: Extension fields.
295
+ extensions : 'OrderedMultiDict[Enum_CGAExtension, CGAExtension]'
296
+
297
+ if TYPE_CHECKING :
298
+ def __init__ (self , modifier : 'Enum_CGAType' , prefix : 'int' , collision_count : 'int' , public_key : 'bytes' ,
299
+ extensions : 'OrderedMultiDict[Enum_CGAExtension, CGAExtension]' ) -> 'None' : ...
300
+
301
+
302
+ @info_final
303
+ class CGAParametersOption (Option ):
304
+ """Data model for CGA Parameters option."""
305
+
306
+ #: CGA parameters, c.f., :rfc:`3972`.
307
+ parameters : 'tuple[CGAParameter, ...]'
308
+
309
+ if TYPE_CHECKING :
310
+ def __init__ (self , type : 'Enum_Option' , length : 'int' , parameters : 'tuple[CGAParameter, ...]' ) -> 'None' : ...
0 commit comments