|
38 | 38 | if TYPE_CHECKING: |
39 | 39 | from typing import Any, Iterator |
40 | 40 |
|
41 | | -#: Bit fields known to leave bits unnamed, as ``schema.field`` (relative to |
| 41 | +#: Bit fields allowed to leave bits unnamed, as ``schema.field`` (relative to |
42 | 42 | #: :mod:`pcapkit.protocols.schema`) -> the ``(start, length)`` bit ranges left |
43 | | -#: uncovered. An entry must match exactly: once a site is fixed, its entry has |
44 | | -#: to go, and a site that changes shape has to be looked at again. |
| 43 | +#: uncovered. Every known site has been fixed, so this is empty, and it must |
| 44 | +#: stay empty unless a new gap is filed as a GitHub issue. An entry must match |
| 45 | +#: exactly: once its site is fixed the entry has to go, and a site that changes |
| 46 | +#: shape has to be looked at again. |
45 | 47 | #: |
46 | | -#: Every entry below packs its unnamed bits as zero, so a parsed packet with |
47 | | -#: any of them set does not rebuild byte-exactly. Naming them means carrying |
48 | | -#: a ``reserved`` value through the protocol's reader, data model and |
49 | | -#: ``make()``, which lies outside the schema files. |
50 | | -KNOWN_GAPS: 'dict[str, tuple[tuple[int, int], ...]]' = { |
51 | | - # HIP [RFC 7401]: the 3 reserved bits between Version and the fixed 1 bit |
52 | | - # of the version octet, and the 14 reserved bits of ROUTE_DST/ROUTE_VIA |
53 | | - # flags [RFC 6028]. Needs pcapkit/protocols/internet/hip.py and |
54 | | - # pcapkit/protocols/data/internet/hip.py. |
55 | | - 'internet.hip.HIP.ver': ((4, 3),), |
56 | | - 'internet.hip.RouteDstParameter.flags': ((2, 14),), |
57 | | - 'internet.hip.RouteViaParameter.flags': ((2, 14),), |
58 | | - # Mobility Header: reserved bits of 24 message and option flag fields. |
59 | | - # Needs pcapkit/protocols/internet/mh.py and |
60 | | - # pcapkit/protocols/data/internet/mh.py -- a family-wide change that wants |
61 | | - # its own review. |
62 | | - 'internet.mh.BindingRevocationMessage.flags': ((3, 13),), |
63 | | - 'internet.mh.DNSUpdateOption.flags': ((1, 7),), |
64 | | - 'internet.mh.DelegatedMNPOption.flags': ((1, 7),), |
65 | | - 'internet.mh.DynamicIPMulticastSelectorOption.flags': ((1, 7),), |
66 | | - 'internet.mh.FastBindingAcknowledgmentMessage.flags': ((1, 7),), |
67 | | - 'internet.mh.FastBindingUpdateMessage.flags': ((4, 12),), |
68 | | - 'internet.mh.FlowBindingMessage.flags': ((1, 7),), |
69 | | - 'internet.mh.HandoverAcknowledgeMessage.flags': ((3, 5),), |
70 | | - 'internet.mh.HandoverInitiateMessage.flags': ((4, 4),), |
71 | | - 'internet.mh.HeartbeatMessage.flags': ((0, 14),), |
72 | | - 'internet.mh.IPv4AddressAcknowledgementOption.flags': ((6, 2),), |
73 | | - 'internet.mh.IPv4DHCPSupportModeOption.flags': ((0, 15),), |
74 | | - 'internet.mh.IPv4HomeAddressReplyOption.flags': ((6, 2),), |
75 | | - 'internet.mh.IPv4HomeAddressRequestOption.flags': ((6, 10),), |
76 | | - 'internet.mh.IPv4TrafficOffloadSelectorOption.flags': ((1, 31),), |
77 | | - 'internet.mh.LocalizedRoutingAcknowledgmentMessage.flags': ((1, 7),), |
78 | | - 'internet.mh.MAGMultipathBindingOption.flags': ((2, 22),), |
79 | | - 'internet.mh.MultiPrefixExtension.flags': ((1, 31),), |
80 | | - 'internet.mh.NATDetectionOption.flags': ((1, 15),), |
81 | | - 'internet.mh.PerSessionBitRateAttribute.flags': ((2, 14),), |
82 | | - 'internet.mh.RedirectOption.flags': ((2, 14),), |
83 | | - 'internet.mh.SubscriptionResponseMessage.flags': ((1, 7),), |
84 | | - 'internet.mh.TransientBindingOption.flags': ((0, 7),), |
85 | | - 'internet.mh.UpdateNotificationMessage.flags': ((2, 14),), |
86 | | -} |
| 48 | +#: A gap packs its unnamed bits as zero, so a parsed packet with any of them |
| 49 | +#: set does not rebuild byte-exactly. |
| 50 | +KNOWN_GAPS: 'dict[str, tuple[tuple[int, int], ...]]' = {} |
87 | 51 |
|
88 | 52 |
|
89 | 53 | def _gaps(width: 'int', namespace: 'dict[str, tuple[int, int]]') -> 'tuple[tuple[int, int], ...]': |
|
0 commit comments